I need to upload images with a different orientation (portrait and landscape) and I don't want to crop post-thumbnails. But I need always thumbnail size 250x250px
.
If I upload a portrait oriented image - it will be resized to 250px height, but the width may be different. And conversely - if I load landscape oriented image - it will be resized to 250px width, but height will be set proportional.
This is what I need:
I need thumbnail size to be always 250x250px. If I upload portrait image - it must be resized to height: 250px and placed in the center of thumbnail canvas. etc...
object-fit: contain
orbackground-size: contain
might help if you did this from CSS. I also saw a image size hack a while back that might give you some ideas - codepad.co/snippet/hPniZA6n