How to Fix HTTP Error When Uploading Media in WordPress

by | Last updated Oct 28, 2024 | Divi Tutorials

This is by far one of the most annoying errors in WordPress.

It is because it’s a non-descriptive error, and shows nothing, so it can be a little difficult to fix.

I actually have no idea why the error occurs. I have been using WordPress for close to 8 years, and I have seen it off in the last 3 maybe. Usually, it goes away on its own, or reuploading the image kind of does the trick but with the recent WordPress core update, it did not.

This issue may be about the web hosting used, or just something else. Honestly, I really haven’t looked it that much to be able to establish the exact cause.

The good news is, I was able to come up with a quick solution that involved adding the following code to the Theme’s function.php.

add_filter( ‘wp_image_editors’, ‘change_graphic_lib’ ); function change_graphic_lib($array) { return array( ‘WP_Image_Editor_GD’, ‘WP_Image_Editor_Imagick’ ); }

Pro Tip: Where to Add PHP Code in Divi Theme

It is important to note that when adding php code into the Theme’s function.php, it must be added into a child theme. This is to avoid losing your changes whenever there is a new Divi Theme update.

Pro Tip: How to Quickly Disable Automatic WordPress Core Updates

Well, that’s it! We hope you enjoyed reading this tutorial.

Shop Divi Products

Buy nicely done Divi Layouts, Child themes, and extensions for your next Divi project.

Related Articles

How to Add Padding Around Featured Images in Divi’s Blog Module

How to Add Padding Around Featured Images in Divi’s Blog Module

If you're using the Divi theme for your WordPress website and want to customize the appearance of your blog posts page, one simple tweak you can make is adding padding around the featured images. This can help create a more visually appealing layout and better...

Divi Logo Guide: Everything You Need to Know

Divi Logo Guide: Everything You Need to Know

A professionally designed logo is a powerful branding asset that can leave a lasting impression on your website visitors. Research shows that a well-designed logo can boost consumer trust in a brand by an impressive 75%. But the question most people ask is – how do...

Leave a Comment

0 Comments

Submit a Comment

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

WP101 - FREE WordPress Tutorials

Enter your email address below to gain access to the FREE WordPress training.

You have Successfully Subscribed!

Pin It on Pinterest