Web Development WordPress

7 Methods to Fix the http Error When Uploading Images in WordPress

In this post, we talk about the ways to solve one of the most common problems WordPress users face: HTTP error.

thumbnail

How to fix the annoying WordPress http error so that you can upload photos and media to your website smoothly.

One of the most common WordPress problems is the inability to add photos and videos to the media library. When it arises, a user sees the HTTP error message displayed next to the name of the file they’ve been trying to upload. Since you’ve landed on this page, you must be looking for ways to fix this issue. 

The good news is that there are quite a few solutions, and we discuss some of them in this post. First, though, let’s talk about why you see this error at all. 

What Causes the WordPress HTTP Error?

This is a generic error that occurs when your image or video does not meet the technical requirements of the WordPress media library. The latter was created to make things simple for users to manage their online media. However, the library requires strict adherence to its specifications. Otherwise, it kicks back an error while you are uploading a file.

The http error is hard to diagnose because WordPress can, in general, be vague about what causes problems. The http error itself does not always tell you exactly why the uploading of a photo or video has suddenly stopped. There can be multiple explanations, including these:

  • A file name with invalid characters
  • An excessively large file size 
  • An unsupported file format. 

Whatever the reason, there are some easy fixes available. Let’s look into these next. 

7 Methods to Fix the WordPress http Error

Fix #1: Clear Your Browser Cache

The easiest way to fix the http error in WordPress is to refresh the page or clear your browser cache. Whenever you upload new files to a server, problems can arise both on your end and on the server side. You need to ensure that any conflicting cache memory or connection issues are removed.

Clear browser history in Mozilla FF

To do this, access your browser settings and clear all browsing history and data. How you do that depends on a specific page viewer. The screenshot above shows the corresponding dialog window for Mozilla Firefox. 

Fix #2: Open a Different Browser

There are many browsers available for free. Chances are one of them will not generate the same error. So if you cannot upload media in one browser, try a different one and see if that solves the problem. 

Fix #3: Change the File Size

WordPress limits the maximum size of files you can add to the media library. You could be getting the http error when uploading an image or video because its size can be outside the 2MB to 150MB range. 

The best thing you can do is resize your photo or video using compression software like WinRaR or an online tool like tinypng.com. For a brief review of such tools, scroll down to Bonus Section #1 below. 

There are also plenty of plugins that will automatically reduce the size of the media you’re uploading. Visit the Plugins section in your WordPress dashboard and type in something like “compress pictures.” You’ll see a lot of valuable tools like the ones in this screenshot. 

WP Plugins for Image Optimization

In Bonus Section #2, you will find a rundown of some noteworthy WordPress plugins for image size reduction.

Fix #4: Change the File Name

WordPress won’t let you rename a file that you have already uploaded. That said, you can always rename the original file and then try to upload it again. Avoid special characters (#, $, !, ~, *, etc.) that violate the WordPress file naming convention. Be sure to only use letters, numbers, and a hyphen if you need to. Something like “happy-file-1.jpg” works well. 

Fix #5: Wait a Few Minutes

WordPress can sometimes behave unpredictably if you are performing a lot of updates or uploads at once. If you continue to get the WordPress http error, try stopping and waiting for a few minutes. The problem could be on the server side. Waiting allows the server to reset its own cache. Try uploading your images after about 3-5 minutes and see if that does the trick.

Fix #6: Deactivate Plugins

Most plugins are designed by independent people using open-source software. These plugins can make your website more functional. Yet, they might not have been developed by professional companies that know how to resolve cross-platform conflicts. If you are still experiencing the http error, try deactivating all the plugins on your WordPress site temporarily.

  • Log into your admin area.
  • Select Plugins on the left. 
  • Select the plugins you want to deactivate by ticking the corresponding checkboxes.
  • Click on the dropdown menu under Plugins at the top of the page and select the Deactivate option. 
  • Click the Apply button. 

Try deactivating your plugins temporarily

This should remove any conflicts that could be interrupting your uploads. If this solution works, be sure to re-activate your plugins after you are done uploading your new media. 

Fix #7: Contact Your Hosting Provider

As a last resort, you may want to contact your WordPress hosting provider. The problem might be on their side. For example, they might have just rolled out an update precisely at the moment you were trying to upload an image. That prevented the server from responding in time. 

This wraps it up. If you encounter the WordPress http error when uploading a file to the media library, don’t panic. Try one of the methods we have described above. In most cases, you will be able to solve the problem without outside help.  

If you are looking for expert advice, the GetDevDone WordPress development team is always ready to provide it. We offer all kinds of WordPress-related services: building custom WordPress themes and plugins to meet specific business needs, fixing performance issues, creating online stores with WooCommerce, and more. 

Reach out to us to discuss your project requirements! 


Bonus Section #1 A Review of Some Popular Online Image Compression Tools 

JPEG Optimizer 

JPEG Optimizer

JPEG Optimizer (http://jpeg-optimizer.com/) lets you decrease the size of an image before optimizing it. This makes loading time much shorter. 

You can specify how much you want an image to shrink by selecting a level between 0 and 99, with 65 being the most well-balanced option. The tool doesn’t work with image formats other than JPEG. 

Pros
  • Several user-specified compression levels 
  • Image size can be reduced prior to optimization 
Cons
  • Works with the JPEG format only 

CompressNow

CompressNow

If you’re a photographer or designer, you might need to change the size of a large number of images at once. That’s where the free online tool CompressNow truly shines. Its drag-and-drop feature lets you include 10 images for optimization in one go. 

The tool also allows you to set a compression level, but only for an entire batch of images. If you want to specify a compression level for one file, upload this file only. 

Pros
  • Supports the most widespread image formats: JPG, JPEG, GIF, and PNG 
  • You can work with a group of images in bulk 
  • One image can weigh up to 9MB 
Cons 
  • You can only set a compression level for a group of images
  • The tool doesn’t retain the PNG and GIF transparency

TinyPNG

TinyPNG

If you’re not completely new to the world of web development and design, you must have heard of TinyPNG. This is one of the veterans among online image compression tools. As such, it probably has more features and a larger ecosystem than most similar size-reducers. 

The tool’s primary focus is PNG. This is the only format that stores partially transparent images. At the same time, these files can weigh a ton. The tool shrinks PNG images while ensuring excellent quality. 

Apart from PNGs, you can optimize images in the JPEG and WEBP formats.

Pros
  • Works with the PNG, JPEG, and WEBP formats 
  • The pro version allows you to upload up to 20 images, each exceeding 5MB
Cons
  • The free version only allows uploading images of up to 5MB 

Optimizilla

Optimizilla

This online tool targets two of the most popular image formats — JPEG and PNG. It allows you to shrink an image to the maximum smallest size, at the same time ensuring the best quality. 

Unlike many other image optimizers, Optimizilla provides a comparison option. That is, you can see an image prior to optimization and after it in the same window.

A slider lets you set a compression level to reduce an image size without affecting quality. You can identify the moment an image starts looking blurry by watching the transformation process in real time. 

Another exciting feature of Optimizilla is the ability to work with images in batches. Drag and drop up to 20 images. Then either set a compression level for the entire batch or go over image by image setting a specific level for each one.

Pros
  • A handy before-after comparison feature
  • Allows you to work with images in bulk, setting a specific compression level for each image 
  • Reduces an image size to the maximum possible level while retaining the best quality 

Cons

  • Works with the PNG and JPEG formats only 

Resize Photos

This tool works with a wide range of image formats — JPG, PNG, GIF, BMP, and PSD. For each image you upload, you can set a compression level of up to 100. 

The most noteworthy feature of Resize Photos (http://www.resize-photos.com) is the ability to give an image a particular visual effect. Among the rest, the options include: 

  • Captions
  • Borders
  • Reflections
  • Shadows 
  • Rounded corners 

Pros 

  • A large variety of supported formats 
  • Ability to apply specific visual effects to images 

Cons 

  • No option for resizing images in bulk 

Bonus Section #2

A Rundown of Some Popular WordPress Image Compression Plugins 

Image optimization & Lazy Load by Optimole

Optimole Image Optimizer

Developer: Optimole 

WordPress Version: 4.7 or higher

One the most popular and efficient WordPress plugins for optimizing images out there. A great thing about it is that it’s totally cloud-based. This means no extra load on your server. 

Another benefit of Optimole is an image CDN. You can expect your images to be served lighting fast no matter the location from which visitors access your website. 

The plugin automatically identifies a user’s viewport and browser and selects the appropriate image size. Plus, it applies the lazy loading technique. Images are loaded when a visitor needs to see them rather than all at once. This reduces page loading time significantly. 

Features 
  • Perfect rendering of images on all devices 
  • Catering to all screen sizes 
  • Compliance with the major WordPress page builders: Elementor, Beaver Builder, and the new block editor in WordPress 5.0 
  • Automatic adjustment of image quality for low-speed Internet connections 
  • Ability to add custom watermarks to images for copyright protection 
  • Supports Retina and WebP 
Pricing 

The vendor offers several pricing options. These differ based on the number of unique daily visitors. Anyone who visits your website once during the day is counted as a unique visitor. 

  • The Free plan offers 5,000 visits monthly. 
  • The Starter plan subscription assumes 25,000 visits per month for $19.08 a month (billed annually).
  • The Business plan sets the starting price at $39.08 per month for 100,000 visits and up to $1165.83 for 3 million monthly visits (billed annually). 
  • The Flexible plan gives you, well, the maximum flexibility. You can count on over 10 million visits per month. The total price depends on the variety and number of features you want. 

EWWW Image Optimizer

EWWW Image Optimizer

Developer: Exactly WWW

WordPress Version: 5.5 or higher

This WordPress image optimization plugin puts security up and front. For one, all communications are SSL-protected. Secondly, you can use the tool for image optimization on your own server for free. 

With EWWW Image Optimizer, you won’t have to perform any operations manually. Everything is fully automated. Want your images to render perfectly no matter the browser, screen resolution, or device? Easy. Need your photos to load only when a user wants to see them? Leverage the lazy loading feature the plugin offers. 

You don’t have to worry about plugin compatibility either. You can use the tool with a huge number of plugins and themes without fearing to break something on your site. The list includes Regenerate Thumbnails, WP Symposium, MediaPress, and a host of others. 

With a paid plan, you get CDN support. That, again, will speed up the image loading process tremendously. 

Features 
  • Supports all major image formats, including the cutting-edge WebP 
  • Unlimited speed and file size (with some exceptions) 
  • Unrivaled safety through SSL encryption and the ability to use the plugin on your own server 
  • Fully automated compression 
  • All-around optimization. You can not only optimize the contents of your media library, but also all the images from one page, including thumbnails and avatars  
  • CDN support
Pricing 

There are three pricing plans you can choose from. They mainly differ in the number of sites, available bandwidth, CDN coverage, and certain other features: 

Standard 

  • $7 per month 
  • US and EU CDN 
  • 1 site 
  • 200 GB Bandwidth

Growth 

  • $15 per month 
  • Global CDN 
  • 10 sites
  • 200 GB Bandwidth

Infinite 

  • $25 per month
  • Global CDN 
  • Unlimited sites
  • 800 GB Bandwidth

 ShortPixel Image Optimizer

Shortpixel Image Optimizer

Developer: ShortPixel

WordPress Version: 4.2.0 or higher

It will take a while to enlist all the great features of ShortPixel Image Optimizer. One of its most notable attractions is a great variety of compression options. 

You can choose lossy or lossless compression for the key image formats: WebP, PNG, JPG, GIF, and AVIF. PDFs are included as well. 

If you’re a photographer, you will appreciate the glossy JPEG compression option. That is a lossy optimization algorithm that produces resulting images of extremely high quality. 

ShortPixel Image Optimizer is compatible with numerous plugins. This includes WooCommerce. So if you own an online store powered by this plugin, you can place visually attractive and lightweight images on your site with a good chance of getting more conversions. 

Features 
  • Supports http and https websites
  • Works with files of any size 
  • Provides CMYK to RGB conversion 
  • Compresses images in the most popular formats: JPG, JPEG, JPEG 2000, JPEG XR,  PNG, GIF (animated and still), PDF
  • Perfect for working with WooCommerce-powered online stores 
  • Supports a variety of compression options: lossy, lossless, and glossy JPEG compression
Pricing 

The vendor offers a plethora of pricing plans. These differ by the number of images you can compress within a monthly period. 

The free plan offers 100 images a month. Then the number grows progressively: from 7,000 images/month for $3.99 all the way up to 16+ million images/month for $1,000. 

The high-end options, starting from 2+ million images for $350 a month, also offer CDN traffic of varied volume (from 4TB/month up to 24TB/month).