WordPress HTTP Image Upload Error – How To Fix It?

WordPress HTTP Image Upload Error

How to Fix HTTP Image Upload Error in WordPress Uploading images pdf videos

If you’re getting an HTTP error when uploading images to WordPress, then your server is probably having a problem with the upload.

The easiest way to test this is to upload a file from your computer and see if it works. If it does, then you know that your server is not blocking the file.

If it doesn’t work, then there are a few reasons why it might be failing:

  • You have too many files being uploaded at once (or one of them has too many files)
  • Your server is running out of memory and cannot handle all of the upload requests at once
  • You may have some other type of problem on your server

In this article you will learn different ways to fix Http Error When Uploading Images to WordPress site.

Numerous things can prove detrimental to your workflow than coming across a significant error. The fact cannot be denied that WordPress does a remarkable job in keeping things uncomplicated and secure; however, when you come across an HTTP error while Uploading Images to Media Library or a broken image using the built-in media uploader, all your efforts go down the drain.

Are you seeing HTTP error while uploading images, pdf, video or other media to WordPress?

HTTP error when uploading images is one of the most annoying things that can happen to your WordPress site. This problem ruins user experience and makes your website look unfriendly and outdated.

Before we dive into discussing quick fixes to solve image uploading issues, let us first get acquainted with http image upload error in wordpress and its causes.

Note – Don’t confuse it with HTTP 503 Service Unavailable Error

What is HTTP error when uploading images WordPress?

You come face to face with WordPress HTTP Error when you have to face a hard time uploading an image with the help of an in-built media library tool.

http image upload error in wordpress

What are the Causes of HTTP Image Upload Error

If you have recently updated to the latest version of WordPress or done other updates, then you are more likely to come across HTTP errors related to image uploads.

That said, there can be numerous other reasons owing to which you are facing HTTP errors in WordPress such as your hosting provider has made a recent update/upgrade, or you may be running scripts or plugins that may tend to affect WordPress media uploads.

 Fixing errors when uploading images in WordPress

Our experts have found that if invaded malware or shared hosting environments are not efficiently configured, such situations can lead to HTTP errors in WordPress, for instance – insufficient memory limits, incorrect file permissions, or else.

? Related PostParse Error: Syntax Error Unexpected in WordPress [FIXED]

There are numerous reasons which could lead to HTTP Error while uploading an image to your WordPress website. One of the reasons can be WordPress not being able to determine the exact reason behind the image upload failure.

Therefore, it displays a simple and generic message – HTTP Error.

Since WordPress is not able to ascertain the exact reasons behind the error, this means you have to try out various solutions to fix the issue.

Let us discuss possible fixes in detail.

How to Fix the HTTP Image Upload Error in WordPress?

If you are also going through the same situation, remember it is not a cul-de-sac, and there is a way out. So, without any further ado, let us talk about the fixes for HTTP error when uploading images, pdf, videos, or other accepted file types to the WordPress.

? Related Post Error Establishing a Database Connection in WordPress

Affirm the HTTP error

Most of the times, the error may have caused due to a temporary glitch in the server. Before you go ahead and try out other methods, first you need to ensure if the issue is persistent.

Upload the image once again and wait for a couple of minutes. In case the image is uploaded in the second attempt, this is a clear indication that there was a temporary problem behind the issue.

Furthermore, make sure you have cleaned up the image, i.e. removed all the apostrophes, semi-colons used in the filename.

In case the issue persists, you can carry on reading other fixes.

 Switch Browsers

Well, there is a possibility that the issue you are facing is not because of the website, but due to something you are not expecting – your browser.

Chrome users have reported that the browser often disables image uploading. While it is one of the finest browsers, try switching to another one, for instance – Firefox to fix the issue.

? Related PostHow to Fix WordPress Stuck in Maintenance Mode?

 Deactivate Paradoxical Plugins

People, across the globe, commend WordPress for having numerous plugins on hand. Besides, the users are provided with more than 50 thousand tools for making an easy and quick upgrade to the whole system.

However, you may have to face an HTTP error once you have installed a plugin, your immediate move should be to deactivate it right away. Image optimization plugins are the main culprit behind this particular issue.

Fix WordPress HTTP Error Uploading Image to Media library

If you have an image optimization plugin, you should disable it (temporarily) and try to upload the image once again.

If the image has been uploaded successfully, you will get to know that the plugin was the main culprit. Now, you need to deactivate the plugin and replace it with a new and functional one.

Increase PHP Memory Limit

One of the key causes of this error is the lack of memory available for WordPress to use. If your server has enough memory, the background upload process will be carried out without a glitch. This is a common issue, particularly for the shared WordPress hosting.

To have a solution for this issue, it is essential to increase the amount of memory PHP can use, i.e. 256 MB.

Below are some of the other methods to increase the PHP memory –

Increase PHP Memory Limit with wp-config.php

All you need to add the following code to your wp-config.php, this will help in increasing the PHP memory limit.

define ('WP_MEMORY_LIMIT', '256M');

HTTP Error when uploading images

Increase PHP Memory Limit with php.ini

If you have access, you can easily edit the php.ini file directly. To do this, you need to follow the below mentioned steps –

  • Log in to your website through SSH or FTP.
  • Go to the root directory of your website.
  • Open or create a php.ini file.

If the file is already there, you can look for the memory_limit setting, and you can make changes as per your requirements.

In case of some shared hosts, you may have to add a PHP directive in a .htaccess file to make php.ini file settings to work effectively. For this, you need to make changes to .htaccess file and the below-mentioned code towards the top of the file –

<IfModule mod_suphp.c>

suPHP_ConfigPath /home/yourusername/public_html


Increase PHP Memory Limit with .htaccess

The .htaccess file (generally hidden) comprises of various settings you can use to change the behavior of the server. In case you don’t have access to php.ini, make sure you try the below discussed method –

  •  Log in to your website through SSH or FTP.
  • Go to the root directory of your website.
  • Look closely to find the .htaccess file.

If you successfully locate it, edit that file to and change the “php_value memory_limit” value.

Increase PHP Memory Limit in cPanel

In case cPanel is being used by your host, PHP memory can be increased in two varied areas. Let us discuss these two areas.

The first one is under the software section. Hit “Select PHP version” and then hit “Switch to PHP options”. Now, you can hit “memory_limit,” and the value will be changed.

The second area is under the software section as well. Hit the “MultiPHP INI Editor” Tool. This allows you to make changes to php.ini. All you need is to scroll down to memory_limit and enter a higher value.

WordPress HTTP Error When Uploading Images

Set PHP Limits Via .htaccess

Set PHP Limits with _htaccess

? Related PostHow To Fix “This Account Has Been Suspended” WordPress

 Make Changes to Your Image Editor

WordPress process the images with the help of two image editors – Imagick and GD Library. While GD Library is known for its impressive performance, Imagick tends to drain the memory and is the key reason behind HTTP error.

The quick solution to this is to make GD Library as your default editor. Are you wondering how you are going to do this? Well, it is as easy as falling off a log. You just need to add the following code in the functions.php file –

function hs_image_editor_default_to_gd( $editors ) {

$gd_editor = 'WP_Image_Editor_GD';

$editors = array_diff( $editors, array( $gd_editor ) );

array_unshift( $editors, $gd_editor );

return $editors;


add_filter( 'wp_image_editors', 'hs_image_editor_default_to_gd' );

Refresh the Page

Let us assume you haven’t faced any HTTP error and you have come across such error for the first time, then you will probably be able to find easy fix for that.

The moment the error surfaces, you need to refresh the page. You need to hit the button of ‘Reload’ (there on your browser) or hit F5 key on the keyboard. Once you have done this, you will be able to upload the image once again, and in all likelihood, it will work this time around.

Most of the times, when you refresh the page, you tend to get rid of various HTTP errors caused by following reasons –

  • Expired login sessions.
  • Temporary internet issues.
  • Other minor issues.

When you are uploading an image, WordPress finds it challenging to make out these as real issues. Owing to this, you receive a generic message contrary to a particular error code.

? Related PostHow To fix Corrupted Tables & Repair WordPress Database

Make Changes to .htaccess

The home of .htaccess is the WordPress root folder, and it performs the role of a blockade for all things. Open .htaccess to add the following code –


The above mentioned will help you to fix HTTP image upload error in WordPress. When you are done, try to add the image once again to see whether the issue has been resolved. If the issue stayed as it is, then you can play with other codes, such as –

# Exclude the file upload and WP CRON scripts from authentication

<FilesMatch "(async-upload\.php|wp-cron\.php|xmlrpc\.php)$">

Satisfy Any

Order allow,deny

Allow from all

Deny from none



<IfModule mod_security.c>

SecFilterEngine Off

SecFilterScanPOST Off


Note – You need to implement them individually, save the changes, and upload the image once again.

Upload a Smaller File

The pixels of the image play a pivotal role, if you reduce the pixels of the image, you may be able to fix the issue. The required pixel size tends to vary on different variables. You can reduce the pixel size of the image to 300×200 and see if it helps.

For Windows user

you can use Paint application to resize the image –

  • Open the image, followed by selecting Resize.
  • Hit the button of Pixels Radio.
  • Change the values in both horizontal and vertical fields.
  • In the end, click OK to save the image.

Upload small Images to prevent WordPress HTTP Error

For Mac users –

  • Open the image in Preview.
  • Hit Tools>Adjust Size.

? Related PostSorry, This File Type Is Not Permitted For Security Reasons

 Check Your Theme

If you have recently installed or updated a new WordPress theme, then the theme maybe the culprit here. Once you have taken the complete backup, you can switch to a default WordPress theme such as Twenty Seventeen.

If the default theme works well, then you should go ahead with it or go for another custom theme that doesn’t endanger the functionality of your website.

 check theme - error uploading pictures wordpress

Upgrade PHP Version

Since version 3.2, the PHP version that is required for WordPress to function efficiently is 5.2.4 or higher. If you don’t have it, it will leave you with HTTP error.

It has been noticed that some hosts use older versions of PHP, this means you will face issue while uploading the image to WordPress.

Now, are you wondering of a way out? First thing you need to do is to ensure that your host is using PHP version 5.2.4 or higher. If your host is not using the latest version, go on and change your host and go for an advanced host.

Rename the Image File

Special characters in the file names can, at times, lead to WordPress issues. Now the worst part is that the data can’t be edited once it gets uploaded; therefore, you will have to rename the content and upload it once again.

To avoid such a situation, ideally, you should develop a habit of adding sequential numbers at the end of image files. Make sure you only use dashes, letters, and numbers. Otherwise, you may have to face errors related to uploading.


Disable Fancy Uploader

WordPress comes bundled with a fancy multi-file uploader. It is responsible for handling the content effortlessly. Well, in some cases, though, you may come across the HTTP error while uploading an image or a video to your website.

Before you engage yourself in baffling fixes, go to your WordPress dashboard and hit Media>Add New. Right under the upload box, you will see a link “Try the browser uploader instead.” Hit the link and give simplified uploader a shot to see if it comes handy in fixing the issue.

 disable browser-uploader

Disable mod_security

Mod_security (being an open source firewall) add security to the hosted websites. At times, this feature can be a reason for issues with WordPress image upload error.

You need to add the code below .htaccess file on the server to disable mod_security.

<IfModule mod_security.c>

SecFilterEngine Off

SecFilterScanPOST Off


Note – As a cPanel user, you can disable mod_security by navigating to the Security Menu. Once you are there, you need to hit Modsec Manager and uncheck the box for all the domains for which you want to disable mod_security for.

Incorrect File Permissions on Web Hosting Server

While you are uploading images in WordPress, incorrect file permissions for WordPress uploads folder on your server, is also one of the key reasons behind HTTP errors.

This means WordPress is no longer authorized to access the specified directory, where your uploaded images are saved for future usage.

It is due to these incorrect permissions that WordPress is not able to upload an image to the server and eventually leads to HTTP error notice.

? Related PostHow To Disable Directory Browsing in WordPress Via .htaccess

Remove Custom Media Library Paths

There may be a chance that the HTTP upload error is due to media path which is disarranged. Such a situation takes place when you have migrated your WordPress website from another host or if you have initiated some changes, but you didn’t set them right afterward.

WordPress assumes its media folder to reside in /wp-content/uploads; generally, it is further broken down into month and year-based folders. If this is not how it is done, then it can be a cumbersome task for the CMS to figure out where to store the content.

Remove Custom Media Library Paths settings

Ask Your WordPress Host

If you are still getting the same WordPress HTTP image upload Error, we suggest you get in touch with your host before you move ahead. There are various additional troubleshooting steps which are a little advanced, and you should leave it to your host to check them for you.

You can get in touch with our 24×7 WP Hacked Help support team for prompt assistance.

Wrap Up

You will agree that WordPress is indeed a versatile and practical content management system, that said it is also one of the most error-prone platforms as well. You may come across issues while processing visual content, so we have suggested some quick fixes for HTTP Error when uploading images in WordPress.

24/7 WP Security & Malware Removal
Is your site hacked or infected with malware? Let us get it fixed for you
Secure My Website(s)