resrc.js - Responsive Image Library
resrc.js is a small, mobile friendly (1.5kb in file size - Minified and Gzipped) responsive image JavaScript library that produces pixel perfect images on demand.
The library requires your images to be served via ReSRC or Axonn Ketto (not a public service) - The Responsive Image Service. Link your images to our simple service and let us take care of everything!
###Deployment #####Test deployment
- Add aws-keys.json file to root with your aws access key and secret key. This file is in the gitignore so will not be included in the repo. Refer to aws-keys.sample.json for an example
- Run
npm install - Increment package.json version number appropriately
- Run
grunt push -test- Grunt push will build and push to s3 [bucket]/test/resrc-x.x.x.min.js. If you want to just build run
grunt build.
- Grunt push will build and push to s3 [bucket]/test/resrc-x.x.x.min.js. If you want to just build run
#####Production deployment
- As above but run
grunt releaseto increment package.json, tag version, commit and push to repo. grunt pushwithout test flag
- HiDPI (retina) Support
- CSS background Support
- Plugin support for features such as: art direction, sharding etc
- Pinch and zoom Image support (Currently iOS only)
- No multiple requests for the same image
- Remote image fallback
- Pixel rounding support
- Placeholder image support
- Supports the popular ‘Mobile First’ approach
- Optional resizing on image pixel down sizing
- Does not use device detection via user-agents or cookies
resrc.js has extensive browser support on Windows/Mac/Linux/iOS/Android.
We have made sure it works on Internet Explorer 6 and above.
Simple | Custom Options | Preview approach (aka: Mobile First) | Art Direction
Simple | CSS Background | Preview approach (aka: Mobile First)
resrc.js supports plugins so you can add any additional functionality you may require. Learn More
For a full list of releases and changes please see the CHANGELOG.
Please see DOCUMENTATION.
Coming Soon.
The repository does not contain a minified resrc.min.js file - this is only generated
for RELEASES. To build your own minified copy
for use in development simply run npm install if you haven't already, followed by grunt build.
This will generate a resrc.min.js file in the dist subdirectory.
resrc.js is actively developed by Dom. Ed works his magic server side, building the core engine.
| Dom Fee | Ed Thurgood |
Please see the CONTRIBUTING file for guidelines.
Please get in touch via: EMAIL.
Copyright (C) 2014 by ReSRC LTD Licensed under the GNU GENERAL PUBLIC LICENSE, Version 2, June 1991
Please see LICENSE.