AWS and WordPress

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.

GD Library Logo

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:

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.

Additional Resources

If you’re still stuck, take a look at the following likes:

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!

Devin Walker is a San Diego-based WordPress Developer and enthusiast. He is the author of several popular and highly-rated WordPress themes and plugins. In his free time he enjoys playing Golf and traveling.

Follow Devin:

One Response to “Amazon EC2 WordPress Not Cropping or Resizing Images Fix”

  1. dividezero

    A bit late to the part but this has been bugging me for days. Who wouldve thought it was this simple to fix. Just came by to say thanks!


Leave a Reply