stnvh / silverstripe-responsive-images-srcset
Addon for responsive images module to use the img/srcset standard
Installs: 21
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 2
Type:silverstripe-module
Requires
This package is not auto-updated.
Last update: 2024-11-09 19:13:44 UTC
README
Addon for the responsive images module to use the img/srcset standard
By Stan Hutcheon - Bigfork Ltd
Installation:
Composer:
composer require "stnvh/silverstripe-responsive-images-srcset" "0.x"
Download:
Clone this repo into the root of your silverstripe installation folder.
Usage:
See the responsive images module usage for basic config.
The option to automatically generate retina images has been added for ease. It can be enabled via yml:
ResponsiveImageExtension: sets: GallerySet: method: CroppedFocusedImage sizes: - {query: "(min-width: 640px)", size: 820x640} - {query: "(min-width: 940px)", size: 1128x768} default_size: 960x480 retina: true
Notes:
- A polyfill is required for IE 11 & below.
- This has only been tested with min-width queries.
After installing via composer, you must /dev/build and flush