0.14.2
Default src for images
- Added new filter
timmy/use_src_default
to define whether a src attribute should be added as a fallback. - Added new filter
timmy/src_default
to define what the src attribute’s content should be. - Improved the default src fallback for images with
data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
. This fixes bugs in IE 11.
Lazy Loading
- Added new
lazy_sizes
parameter toget_timber_image_responsive_src()
function. This will allow you to prefix thesizes
attribute withdata-
. - Improved lazy filter by adding a parameter to define which attributes should be prefixed with
data-
. E.g., you can now useimage|get_timber_image_responsive('large')|lazy(['srcset', 'src', 'sizes'])
to prefix thesrcset
, thesrc
and thesizes
attributes withdata-
.
You can read more about this in the Lazy Loading Documentation