Answer the question
In order to leave comments, you need to log in
How to implement aspect ratio thumbnails generation functionality in Yii2?
There is some area on the page fixed in width and height - let's say this -
There is an obviously known (maximum three) number of images allowed to be uploaded to the page with different ratios, orientations (landscape, album) and different sizes.
In other words, there are three options for the location of images in the above area:
I will illustrate with an example, let this image be the source image uploaded by the user:
Therefore, the possible options for resizing and generating thumbs will look like this:
1 image uploaded:
2 images uploaded:
Uploaded 3 images:
In other words, you need a smart resizer and a miniature generator, or a plan (how to file) if there is no resizer.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question