If the image is vertically longer, limit it to a 3:4 width to height.
If the image is horizontally longer, limit it to 4:2 width to height.
Anything in between remains as is.
We want to do this while maintaining the image's aspect ratio, so that excess parts outside of 3:4 or 4:2 ratio get center cropped.
To do this we must set a div's background image and resize the div. Then set an image element with opacity 0 on top.
If the image is vertically longer, limit it to a 3:4 width to height.
If the image is horizontally longer, limit it to 4:2 width to height.
Anything in between remains as is.
We want to do this while maintaining the image's aspect ratio, so that excess parts outside of 3:4 or 4:2 ratio get center cropped. To do this we must set a div's background image and resize the div. Then set an image element with opacity 0 on top.
Needs javascript.