refresh-images

0.1.0 • Public • Published

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

Package Sidebar

Install

npm i refresh-images

Weekly Downloads

0

Version

0.1.0

License

MIT

Last publish

Collaborators

  • ashaffer88