I want to be able to upload a 1000 x 1000px image as a featured image on a post but then be able to crop it to the required featured image size. Any way to enable this?
-
WordPress automatically creates all the images sizes when uploading your image that you have registered in your code/theme. You would need to change the size you require for your featured image so when you upload and set featured image its the correct size or create a new image size and update your template files to call this new featured image. (This article might help you with specific details: wpexplorer.com/wordpress-image-crop-sizes)– Matt RoyalCommented Dec 8, 2014 at 5:27
2 Answers
This can be achieved by either creating an image size using <?php add_image_size( 'my-image-size', 1000, 400, true ); ?>
or you can implement the Aqua Resizer to your theme/plugin. Aqua Resizer works almost in the same fashion as the good old TimThumb, but instead saves the image as a correct image size in WordPress using WordPress' intermediate sizes methods.
This is called Post Thumbnails. It was set by your theme.
You can open file functions.php and search for set_post_thumbnail_size
. If found, change it :
set_post_thumbnail_size(9999999,999999)
If not found, just insert new line.
-
1Please don't rollback my changes. It is a legit edit. All code needs to be in back ticks or code block. Thank you Commented Dec 8, 2014 at 12:46