refresh-images
v0.1.0
Published
Reload all image tags that have a certain src/url
Downloads
7
Maintainers
Readme
refresh-images
Refresh img tags that match a certain src/url. Useful in conjunction with invalidate to update a changed image without a page reload.
Installation
npm install refresh-images --save
Usage
var invalidate = require('invalidate')
var refreshImages = require('refresh-images')
function avatarChanged (url) {
invalidate(url, function (err) {
if (err) throw err
refreshImages(url)
})
}