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...

enter image description here

  • Is this the built in thumbnail size? Do you have the "Crop thumbnail to exact dimensions" box checked under Settings > Media?
    – Milo
    Jan 30, 2016 at 17:15
  • 1
    I don't need to crop images. I need ti fit it in thumbnail canvas size.
    – Artur
    Jan 30, 2016 at 17:32
  • So when you say "I need thumbnail size to be always 250x250px", you mean proportional within a maximum of 250x250?
    – Milo
    Jan 30, 2016 at 17:49
  • U have upload picture in my question to illustrate what I need...
    – Artur
    Jan 30, 2016 at 17:54
  • object-fit: contain or background-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
    – jgraup
    Jan 30, 2016 at 21:06

1 Answer 1


I would try adding

set_post_thumbnail_size( 250, 250, false );

In the theme's functions.php.

(see codex on Setting Thumbnail Size)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.