How to Fix the HTTP Image Upload Error

How to Fix the HTTP Image Upload Error

If you see the HTTP error while uploading media to WordPress using the built-in media uploader, please read this article for trouble shooting.

The Causes of HTTP Error During Media Upload and Solutions

There are a number of things that could lead to a HTTP error when you are trying to upload files using the WordPress media uploader. Basically, WordPress is unable to figure out the cause and that’s why it displays the generic ‘HTTP error’ message.

How to Fix the HTTP Image Upload Error in WordPress


1. Image is too large

The HTTP error happens if you are trying to upload an image that is too large in file size or dimensions.

1). Image File Size

To make sure your images are web-friendly, image files should ideally be between 60 and 500 KB – definitely no more than 1MB. If the image file size is too large, it may result in a slow upload speed or even an upload failure.

2). Image Dimensions (width & height)

When using CeraMag theme, in order to ensure that the images on your website always look sharp and clear on all devices without slowing down the site speed, images will be scaled and saved into different sizes after you upload them.

However, if the dimensions of an image you are trying to upload is too large (for example, 3000 x 3000 pixel or larger, it depends on your server resources), then it may cause problems when WordPress is trying to generate thumbnails.

So it’s important to not only check the file size but also the dimensions of the image. Uploading an image with higher dimensions resulted in an HTTP Error / error 500 even with small file sizes.

Solutions:

  • The Most Important Step: Please decrease your image file size and dimensions before uploading. You will need to use a photo editor application (e.g. Photoshop, or another application) to edit your images. The recommended full size of an image is 1920 x auto px for CeraMag theme. Therefore you can reduce your image around that size before uploading.
  • Increase PHP Memory. Please log into your hosting cPanel and change the value. Or you can contact your hosting provider and ask them to increase your PHP memory limit. (You may like to read: CeraMag Documentation – Theme Requirements.)
  • If you see the message “File exceeds the upload_max_filesize”, it’s because your PHP Upload Max Filesize (upload_max_filesize) set in your php.ini file is smaller than the file size of the image that you are trying to upload. Please try to change the value of “upload_max_filesize“. You can contact your hosting provider and ask them to increase the limit.

2. Image File Name

Please check the file name of the image. If the file name contains any special character (like a semi-colon, an equals sign or an apostrophe and etc) it might not be uploaded.


3. Plugin Conflicts

This problem may be caused by a installed plugin. To find out which plugin caused the problem, try disabling all third-party plugins on your site, clear the cache, and then try uploading an image to see if the problem still exists. Then reactivate these plugins one by one and check again.


4. Other possible causes and solutions

Please read this article: How to Fix the HTTP Image Upload Error in WordPress