We recently moved over our site to an Amazon EC2 Instance and noticed on our new posts that the featured image thumbnail wasn’t cropping properly. Rather, it was displaying the large version of the image at a smaller resolution.
At first, we thought it was an issue with the W3TC CDN configuration we have with S3/CloudFront. After an exhausting number of searches this proved to be a dead-end. Next, we started tooling around in the Media panel and noticed the “Edit” and cropping functionality was missing there…
This lead us to believe there was a package missing on our server; this was not likely something at fault with WordPress. It hardly ever is with WordPress. A good rule of thumb is to inspect the server setup/environment/permissions first, then plugins, followed by the theme and then finally core.
Missing GD Library
Without the GD libraries properly installed on your server you will only get file uploads at their original size and no image cropping. You or someone else most likely forgot to install this package during your server setup. You can check to see if it’s installed by using phpinfo() function.
GD Installation on Linux
In terminal/putty type the following command to install GD Library:
sudo apt-get install php5-gd
GD Install for Shared Hosts
Most shared hosts like HostGator and BlueHost have this library installed already for you. If you are on a shared host that does not have GD Library installed then you will need to submit a request for them to install it for you.
If you’re still stuck, take a look at the following likes:
- the_post_thumbnail hard cropping not working no matter what – Where we got our answer and posted this article from **
- Image Processing and GD
If you’ve got it working now, here’s some nice plugins to help with image resizing:
- Renegerate Thumbnails – Helpful for you to recreate the image sizes after you get it working properly.
- Media Tools – Helps you set featured images, pull images from remote hosts to locally, add post thumbnail support and more.
Did this work for you? Let us know your thoughts and resolutions or issues in the comments below!