imgix.js is a dependency-free JavaScript library for the browser that allows for easy integration of imgix into websites. imgix.js allows developers to easily generate responsive images using the srcset and sizes attributes, or the picture element. This lets you write a single image URL that is parsed and used to make images look great at any screen size, by using imgix to process and resize your images on the fly. imgix.js is designed to run in the browser, manipulating existing img elements on an HTML page. If you're looking for a JavaScript library that can programmatically generate imgix URLs, consider using imgix-core-js instead. Once imgix.js has been included on the page, it will automatically run once, after the DOMContentLoaded event fires. This will detect and process all img, picture, and source tags on the page that are set up to use imgix.js as described in the Usage section.
Features
- Disable auto-initialization
- Manually initialize imgix.js
- Lazy Loading With lazysizes
- Custom Input Attributes
- Base-64 encoded parameters
- Browser Support