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?