Support for `renderDimensionAttributes`, `width`, `height`, `loading` and `format` resp. `formats`
Kaleidoscope will now render width
and height
attributes whenever possible by default and thus help to prevent content reflow when images are loaded. This can be controlled via renderDimensionAttributes
. Additionally the loading
attribute can be used and width
, height
and format
can be defined on the prototypes directly.
Sitegeist.Kaleidoscope:Image:
renderDimensionAttributes
: render dimension attributes (width/height) when the data is available from the imageSource. Enabled by defaultloading
: (optional) loading attribute for the img tagwidth
: (optional) the base width, will be applied to theimageSource
height
: (optional) the base height, will be applied to theimageSource
format
: (optional) the image-format likewebp
orpng
, is applied to theimageSource
Sitegeist.Kaleidoscope:Picture:
renderDimensionAttributes
: render dimension attributes (width/height) for the img-tag when the data is available from the imageSource
if not specified dimensions will be enabled automatically for pictures that only use theformats
options.formats
: (optional) image formats that will be rendered as sources of separate type (string or array)loading
: (optional) loading attribute for the img tagwidth
: (optional) the base width, will be applied to theimageSource
height
: (optional) the base height, will be applied to theimageSource
Sitegeist.Kaleidoscope:Source:
format
: (optional) the image-format for the source likewebp
orpng
, is applied toimageSource
andtype
width
: (optional) the base width, will be applied to theimageSource
height
: (optional) the base height, will be applied to theimageSource
In addition all Sitegeist.Kaleidoscope:Source rendered inside of a Sitegeist.Kaleidoscope:Picture
will inherit the values imageSource
, srcset
, sizes
, width
and height
.