Skip to Main Content

How to fix the image upload error on WordPress

Divi: the easiest WordPress theme to use

Divi: The best WordPress theme of all time!

With over 901.000 downloads, Divi is the most popular WordPress theme in the world. It is complete, easy to use and comes with more than 62 free templates. [Recommended]

Do you see the HTTP error when downloading media on WordPress? 

This error usually occurs when you download an image or other files on WordPress using the Media Manager.

In this tutorial, we are going to show you how to easily fix HTTP image upload error in WordPress.

But before, if you have never installed WordPress discover How to Install a WordPress Blog in 7 Steps et How to search, install and activate a WordPress theme on your blog 

Then back to why we are here.

What are the causes of WordPress media upload error?

There are a number of things that could lead to an HTTP error when trying to upload files using the media manager WordPress.

Discover Why do you have to start optimizing your WordPress blog by images

Basically WordPress is unable to understand the cause and this is why it displays the generic message "HTTP error."

The frustrating part is that this error message gives you no idea what may have caused it. This means you need to try different solutions to find the cause and correct the error.

That being said, let's look at how to solve and correct the HTTP error when downloading media on WordPress.

1. Ensure that the HTTP error is not temporary

First, wait a few minutes and try again to upload your image file. This error is sometimes caused by unusual traffic and low server resources that are automatically attached to most WordPress hosting servers.

Discover How to use SSL and HTTPS with WordPress

If that does not work, you can try downloading a different image file. If the other file uploads successfully, try saving your original image file in a smaller size and try uploading it again.

Finally, you can try to save the file in a different format. For example, change jpeg png using image editing software. After that, try downloading the file.

See also How To Fix 502 Bad Gateway Error On WordPress

If all of these steps result in the HTTP error, it means that the error is not caused by a temporary problem and requires your immediate attention.

2. Increase the limit of WordPress memory

The most common cause of this error is the lack of available memory to use on WordPress. To solve this problem, you must increase the amount of memory that PHP can use on your server.

Easily create your website with Elementor

Elementor allows you to easily create any website design with a professional look. Stop paying expensive for what you can do yourself. [Free]

You can do this by adding the following code to your file wp-config.php .

define ( 'WP_MEMORY_LIMIT' '256M');

This code increases the limit of WordPress memory to 256 MB, which would be enough to solve all memory limit issues.

We also advise you to consult our 4 methods to increase WordPress's maximum memory limit

3. Change the image editor library used by WordPress

WordPress runs on PHP which uses two modules to manage images. These modules are called GD Library and Imagick. WordPress can use one of two libraries according to that which is available.

However, Imagick is often faced with memory problems causing image upload and HTTP error. To solve this problem, you can make the GD library your default image editor.

You can do this by simply adding this code to functions.php file of your theme or on your WordPress plugin.

function bpc_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', 'bpc_image_editor_default_to_gd');

After adding this code, you can try to download files using the online media development program. If that doesn't solve the problem, you can remove this code and try other methods that are described in this tutorial.

Are you looking for the best WordPress themes and plugins?

Download the best plugins and WordPress themes on Envato and easily create your website. Already more than 49.720.000 downloads. [EXCLUSIVE]

4. Using the .htaccess method

This method allows you to control how Imagick uses server resources. Many shared web hosting providers limit Imagick's ability to use multiple threads for faster image processing. 

An easy solution is to add the following code in your .htaccess file :

SetEnv MAGICK_THREAD_LIMIT 1

This code simply limits Imagick to use a single thread to process images.

Discover also some premium WordPress plugins  

You can use other WordPress plugins to give a modern look and optimize the grip of your blog or website.

We offer you here some premium WordPress plugins that will help you do that.

1. Ultimate WooCommerce Expandable Categories

This WordPress plugin allows you to easily edit long lists of annoying WooCommerce categories, and replace them with different levels of sub-elements in an accordion menu.

Its main features are: the possibility of activating it finally that it works automatically (no parameters required!), The support of multiple levels of categories (categories, sub-categories, etc.), the highlighting of the active category, the opening of all parent categories if the current category is inside, compatibility with any WooCommerce theme, responsive at will, free updates and very active customer support.

Download | Demo | Web hosting

2. How More

Comment Plus is another WordPress plugin that will manage your comment section perfectly, while encouraging your potential subscribers to leave their comments. 

In short it has been designed to activate more engagement among your visitors and it is a great conversion tool that you will have to try.

Its main features are: displaying welcome messages on the first comment, sending notifications for new comments or responses to readers, support for images attached to comments (png, jpg and gif supported) , the total control of each feature, the support of shortcodes, the affixing of watermarks on images for the purpose of protecting them and many others.

Download | Demo | Web hosting

3. WP CCGallery

The WordPress plugin CCGallery allows you to easily integrate a gallery in your WordPress theme. It displays all your images, audio and video files in a sleek and attractive interface. You will be able to browse your images in CoverFlow mode or in a thumbnail mode.

You can also easily switch between the two display modes, and even filter the items by displaying only images, or audio or video files. Custom filtering of items by category is also supported. 

Download | Demo | Web hosting

Other recommended resources

We also invite you to consult the resources below to go further in the grip and control of your website and blog.

 

Easily create your Online Store

Download free WooCommerce, the best e-commerce plugins to sell your physical and digital products on WordPress. [Recommended]

 

Conclusion

Here ! That's it for this tutorial. We hope this article has helped you fix HTTP error while uploading media content to WordPress. feel free to share the tip with your friends on your social networks.

However, you will also be able to consult our resources, if you need more elements to carry out your projects of creation of Internet sites, by consulting our guide on the WordPress blog creation.

But in the meantime, tell us about your Comments and suggestions in the dedicated section.

...  

 

This article features 0 comments

Leave a comment

Your email address will not be published. Required fields are marked with *

This site uses Akismet to reduce unwanted. Learn more about how your comments data is used.

Back To Top
7 shares
Share6
tweet1
Save