You’ve uploaded your theme, written your content and maybe tweaked the layout to perfectly reflect your personality and style. Since no website is complete without a least a few appropriate images, you head off to Media Library. Thinking this process will only take a few minutes, you casually locate your image files and press upload.
After a few moments, something unexpected happens. Rather than seeing your beautiful images resting in the media library for use, you receive an error. Or, perhaps, the image file uploads but then refuses to display properly.
When it comes to WordPress errors, the most common cause of many frustrated nights fiddling with this otherwise simplistic platform is images. Whether your images aren’t uploading, or are rendering improperly, troubleshooting image issues can be an annoying, and sometimes time-consuming, process.
While there are many reasons why images aren’t working with your WordPress website, there are several common reasons shared by all enterprises. The following troubleshooting tips can help narrow the culprit so you can return to doing what you do best, creating an awesome website!
Image Issue: HTTP Error During Upload
If you receive an HTTP error while trying to upload an image, there can be several reasons for this. Let’s take a moment and explore possible solutions:
- Image Size – Is your image too large? While an HTTP Error is common for a variety of image file sizes, it’s often the result of uploading an unnecessarily large image. Compress and optimize your image before uploading, which you should be doing anyway to safeguard site performance.
- Too Little WordPress Memory – If your PHP limits are too small, then you won’t be able to upload images, themes, plugins or anything else you desire. This is a common reason if you haven’t updated your WordPress site, or are attempting to download larger image files. Navigate to the wp-config.php file from your cPanel File Manager (or server root file directory). Look for memory limits within the file or add the following code snippet before the following phrase: /* That’s all, stop editing! Happy blogging. */
/** Increases memory limit */
define( ‘WP_MEMORY_LIMIT’, ‘256M’);
Image Issue: File Exceeded Max Upload Size
Either WordPress or your server has a limit that’s too small for your current project. While you can typically solve this issue by compressing image size, if not, then you should increase the maximum file upload limits defined by your server. To do this, perform the following:
- Access your PHP Administrator dashboard, which is typically found under “PHP” in your cPanel.
- Open/edit the file labeled: php.ini
- Insert the following code:
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
Image Issue: Flipped or Upside Down Images
After uploading you image, is it flipped backwards or upside down? This is common issue for those who upload images from their Apple device (iOS). Thankfully, fixing this error is also quite simple. Here’s the solution:
- Go to your Media Library and click on the incorrect image
- Click “Edit Image” and wait for the editing options to appear
- Use the rotation buttons, located above the image underneath the Permalink URL. These buttons feature two squares with arrows dictating the rotation direction it performs.
- Manipulate until the image is how you intend
- Click Save