greencode
Member
Posted 10 months ago #
I have the following set up in my functions.php
add_image_size( 'medium-img', 450, 300, true );
and I have uploaded an image that is 1024x768.
The problem is that it's cropping the image to 400x300.
Is there any way I can get images that are not of the same ratio to crop at the size I've specified?
kmessinger
Member
Posted 10 months ago #
What do you have under settings, media?
greencode
Member
Posted 10 months ago #
I have Medium thumbnail as 450x300 but I'm using the functions.php so I can add more sizes than those in the Settings > Media section.
The reason why it's only cropping to 400x300 and not 450x300 is that a 1024x768 image with width of 450 then has a height of 338 which is too high so it's cropping it to the height of 300.
However I need it to crop at exactly 450x300.
greencode
Member
Posted 10 months ago #
Ah ha, I've just installed and run Regenerate Thumbnails and that appears to have done the trick!