Answer the question
In order to leave comments, you need to log in
How to resize an image based on orientation?
everything goes through the standard LiipImagineBundle
myf:
quality: 85
jpeg_quality: 85
filters:
strip: ~
thumbnail:
size: [465, 465]
mode: inset
Answer the question
In order to leave comments, you need to log in
I do not remember exactly the methods of this library, but the logic seems to be simple:
1. In the code, we determine the orientation by the ratio of the side vertically and horizontally.
2. If the picture is in portrait orientation (width in X is less than in Y), then you do applyFilter (a), otherwise you apply filter b.
Why doesn't it fit?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question