0.1.0 • Published 9 years ago

refresh-images v0.1.0

Weekly downloads
8
License
MIT
Repository
github
Last release
9 years ago

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)
  })
}