• I want to use thumbnails (max. 400px width). That means thumbnails can be 400px, but not always they should be 400px width. They can be even less. So, in the same page, one thumb 400px, one 320px and one 350px.

  • I want to crop them using the WordPress crop tool.

I've been able to get the thumbs both correctly cropped and 400px. What I can't get is a thumb less than 400px (I've setted that width in the media options).

In other words, WordPress always set the thumb to 400px, despite of how I edited the images. I would like it to consider 400px only the max width instead, so I can edit and image to to have the thumbnails cropped (I mean with the edit tool) and resized say, to 320px.

Another way to say it: I want WordPress to serve the thumbnails 400px width only if I didn't resized them less than 400px.

Is there any way to do it?


1 Answer 1


From my understanding on how WordPress crops, it's not going to stretch your image to a certain size, so if you upload an image that is 300px wide, it isn't going to stretch the image to 400px, it will keep that width and proportionally create a height. Make sure that

Crop thumbnail to exact dimensions (normally thumbnails are proportional)

is checked in the media section of your settings. If you're looking for new image sizes you can use add_image_size().

If you want to size down an already created thumbnail, you can click the image to edit it (inside the tinyMCE) and size it down there. You will be given percentages and a little box on how it might look inside your content.

  • Well no. What I need is to load big images, then use the big for zoom and set the thumbnail by cropping and resizing with the editing tools of wordpress. And that's all fine, except the fact that wordpress (if you start by uploading a bigger image) seems to keep always the thumb to the size setted in media options, so for example, despite the fact that you cropped it to say, 320 (while having 400 in media options). What I would like instead, it's having that size considered as the max, and if I resize the thumb to a smaller size, have have that size served instead of the "max". Feb 27, 2014 at 17:38
  • I'm a little confused. It sounds like what you would like to do it upload a large image and then give it a static size (width 300px) on a per image upload basis, even though the thumbnail size is 400px, is that right?
    – Howdy_McGee
    Feb 27, 2014 at 17:45
  • Yes I know I'm not english so it's a bit difficult for me to explain well. Try 2 another ways: 1. input case: a big image, media options for thumb: 400px width; output case: the same big image for zoom, a thumb that is less than 400px. way 2 to explain: i want to have arbitrary widths for thumbs, despite of the value in media options. The value in media options should be used only as max value, only to eventually small down. That said, what I see is that if I resize (only) the thumb in the edit view it IS SAVED (say) 320 in uploads dir, but if called as a thumb is then served the 400px one. Feb 28, 2014 at 7:55
  • The reason for having it, is that I need to build products pages with galleries, where there will be always an arbitrary number of images (1 to 4) and with arbitrary widths. A way of doing it is in fact to register several image sizes that suits all the use cases (300,320,340, etc..) and then pass the right size to the shortcode each time, but I was searching for a more elegant (and easier for my client) solution, like simply the ability to resize each thumb to arbitrary dimesions if less then the media option value. Feb 28, 2014 at 8:02

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.