inline-retina
v1.0.2
Published
JavaScript module to detect and update inline retina images
Downloads
6
Maintainers
Readme
Inline Retina
A simple way to use inline retina images without all the extra HTML markup.
Install
npm install inline-retina
How to use
Add inline-retina.min.js to your HTML.
Add a class "retina" to all inline images that also have a retina version available. The retina image needs to be saved with the same name and same directory as the non-retina version but also appending "@2x" to the end of the name.
Example:
Original inline image: images/hero-skitch.png
Retina version: images/[email protected]
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
License
MIT © Ryan Burgess