Releases: sitegeist/Sitegeist.Kaleidoscope
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
.
Fix a bug in ResourceImageSource
Merge pull request #23 from jonnitto/bugfix/resource_image_source BUGFIX: Fix broken ResourceImageSource
Variant Preset and Neos 4.3 + 5 Support
Provides a new property variantPreset in the AssetImageSource and
DummyImageSource Fusion prototypes. The expect a string giving the
preset identifier and preset variant name separated by ::, like:
Acme.Com:Component.Teaser.Hero::landscape
In addition this adds a new method useVariantPreset() to the
ImageSourceHelperInterface that can be used to specify a variant to
use based on a configured asset variant preset:
useVariantPreset('Acme.Com:Component.Teaser.Hero', 'landscape')
That variant (if existing) of an asset will be used as base before any
further adjustments are applied.
Additionally the Sitegeist.Kaleidoscope:Picture now accepts to pass
afx content
VariantPreset Support
Provides a new property variantPreset
in the AssetImageSource
and
DummyImageSource
Fusion prototypes. The expect a string giving the
preset identifier and preset variant name separated by ::
, like:
Acme.Com:Component.Teaser.Hero::landscape
In addition this adds a new method useVariantPreset()
to the
ImageSourceHelperInterface
that can be used to specify a variant to
use based on a configured asset variant preset:
useVariantPreset('Acme.Com:Component.Teaser.Hero', 'landscape')
That variant (if existing) of an asset will be used as base before any
further adjustments are applied.
Furthermore this changes the API for using thumbnail presets:
- renames
applyPreset()
toapplyThumbnailPreset()
in
ImageSourceHelperInterface
- renames
preset
tothumbnailPreset
in Fusion prototypes
The key preset
in Fusion is still used if thumbnailPreset
is not
given to provide b/c.
Resolves #12
Neos 5 / Flow 6 compatibility
Merge branch 'feature/flow6-compatibility' # Conflicts: # Classes/Controller/DummyImageController.php # composer.json
BUGFIX: Catch case where image could not be rendered but no exception is thrown
In addition the version constraint for neos 5 was removed again because of breaking changes in the http chain. Kaleidoscope 5 for Neos 5 will be released soon.
Support `format` and add Sitegeist.Kaleidoscope:Source prototype
Add format
option for imageSources setFormat()
for helpers and prototype Sitegeist.Kaleidoscope:Source
Supported formats are amongst others: webp
, png
, jpg
, jpeg
(!!! the format has to be supported by the current imagine driver)
- the
format
option in the *ImageSource prototypes allows to set the format on ImageSource Definition - the
setFormat()
method of the *imageSourceHelpers allows to do this later to already define ImageSourceHelpers on the presentation side - the prototype
Sitegeist.Kaleidoscope:Source
is used insideSitegeist.Kaleidoscope:Picture
for the rendering of sources but it can may also be used standalone
In addition the dummyImageSource will now return a fallback image with statusCode 500 in case any exception occurs. This can happen if the Imagine driver does not support drawing or the chosen format.
This could have been released as feature version but since it will require adjustments in Sitegeist.Lazybones it is safer to raise the major version.
add `setDimensions` to imageSourceInterface and add second `preserveAspect` argument to `setWidth` and `setHeight
Merge pull request #11 from sitegeist/feature/addSetDimensionsAndPres… …erverAspect FEATURE: add `setDimensions` to imageSourceInterface and add second `preserveAspect` argument to `setWidth` and `setHeight`
Improve rendering of small dummy images and add moiree pattern to detect browser scaling
TASK: Improve rendering of small images and add moiree pattern to det… …ect browser scaling
BUGFIX: __toString must not throw an exception
Merge pull request #6 from daniellienert/bugfix/no-exception-in-tostring BUGFIX: __toString must not throw an exception