Feature #86310
openFallback logic for image viewhelpers
0%
Description
To simplify the management of crop variants a fallback logic for image viewhelpers could be implemented.
Let's suppose we have 4 variants (bootstrap_package case): default, medium, small, extrasmall.
If the editor crops only the 'default' variant there's no way to make this crop to be used in every case (breakpoints). In this case the FE will crop the image in large resolutions ('default' variant) but not in smaller resolutions (medium, small, extrasmall).
So the editor is forced to crop and maintain all the 4 variants if (s)he wants that the default crop is valid for every breakpoint.
This is inconvenient.
There should be an option to set the fallback like:
'cropVariantsFallback' => 'extrasmall,small,medium,default'
so when TYPO3 renders the 'extrasmall' variant, it checks if there's a crop, if not it checks 'small', if not 'medium' and finally, if also 'medium' is not cropped, it crops as 'default' is cropped. If also 'default' is not cropped then it renders the image without crop.
Or simply there could be a switch like:
'cropVariantsFallback' => true
and TYPO3 checks the crop variants sorted by declaration order.