Feature #86310

Fallback logic for image viewhelpers

Added by Christian Toffolo about 1 year ago. Updated 21 days ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Image Cropping
Start date:
2018-09-19
Due date:
% Done:

0%

PHP Version:
Tags:
Complexity:
Sprint Focus:

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.

History

#1 Updated by Susanne Moog about 1 year ago

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

#2 Updated by Christian Eßl 21 days ago

  • Category set to Image Cropping

Also available in: Atom PDF