-
Improvement
-
Resolution: Duplicate
-
Major
-
3.0
-
None
Ticket CMS-1267 asked for the possibility to resize an image keeping the aspect ratio, to fit in a rectangle with specified maximum dimensions.
The former has been done, the latter doesn't really work as it could be expected: the image is resized and the aspect ratio is kept, whatever the image is larger than the given max dimensions (scaled down, OK), or already fits in the given dimensions (upscaled, not OK).
The helper signature is "resolveBoundedImage(imageType, imagePath, maxWidth, maxHeight)": "maxWidth" and "maxHeight" names let the user think that an image won't be upscaled...
So either all the names aren't what they seem to point out and should be changed, or the helper behavior should be modified.
Maybe more helpers or more parameters should be added ? Raphaël's propositions were a good start...
- Référence
-
CMS-1267 Helper to resize an image keeping the aspect ratio (as a fiel of structured content)
- Closed