Feature #86310

Fallback logic for image viewhelpers

Added by Christian Toffolo over 2 years ago. Updated over 1 year ago.

Should have
Image Cropping
Start date:
Due date:
% Done:


Estimated time:
PHP Version:
Sprint Focus:


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.


Updated by Susanne Moog over 2 years ago

  • Target version changed from 9 LTS to Candidate for Major Version

Updated by Christian Eßl over 1 year ago

  • Category set to Image Cropping

Also available in: Atom PDF