Maintenance

"HTTP Error" When Uploading Images to WordPress: Causes and Fixes

WordPress HTTP error when uploading images? Check file size, memory and time limits, Imagick or GD, permissions, mod_security and plugins, in a safe order.

"HTTP Error" When Uploading Images to WordPress: Causes and Fixes
On this page
  1. What the "HTTP error" actually means
  2. WordPress HTTP error uploading images: quick diagnosis table
  3. Check 1: Retry, and test with a small image
  4. Check 2: File size, dimensions and format
  5. Check 3: Memory and time limits
  6. Check 4: The image library, Imagick or GD
  7. Check 5: Folder permissions and disk space
  8. Check 6: Security rules and mod_security
  9. Check 7: Plugins and themes
  10. A safe order, and when to involve your host
  11. Quick check: narrow down the HTTP error
  12. When to get help
  13. FAQs
Key takeaways
  • The WordPress "HTTP error" is a generic message: the upload or the image resizing step failed on the server, and the real reason is in the server logs.
  • Most cases come down to a large photo, low memory or time limits, the image library (Imagick or GD), folder permissions or a security rule.
  • Work from the cheapest check to the deepest: retry, shrink the image, test another browser, then limits, image library, permissions, firewall and plugins.

The WordPress "HTTP error" when uploading images means the upload request failed on the server, either while receiving the file or while WordPress was resizing it into thumbnails. The message is generic, so you fix it by elimination: retry, try a smaller image, then check memory and time limits, the image library (Imagick or GD), folder permissions, security rules and plugins. In most cases one of the first four checks below solves it.

Below is the order I use, from the quick checks anyone can do to the server-side ones you may need your host for.

What the "HTTP error" actually means

When you drop an image into the Media Library, two things happen. First the browser uploads the file to wp-admin/async-upload.php. Then WordPress generates several smaller copies (thumbnail, medium, large and any sizes your theme or plugins add) and, on recent versions, may create a scaled version of very large images. If the server returns anything other than a clean success during either step, the media uploader shows "HTTP error" without detail.

That is why the same image can fail on one site and work on another: the limits and image libraries differ between hosting accounts.

To see a more specific message, open your browser's developer tools before uploading, go to the Network tab and click the async-upload.php request after it fails. The status code (such as 500, 403 or 413) and the response text often name the real problem, which narrows the checks below.

WordPress HTTP error uploading images: quick diagnosis table

What you noticeLikely causeWhere to look
Only large phone or camera photos failMemory or time limit during resizingMemory limit, max_execution_time, image dimensions
Every upload fails, even tiny imagesPermissions, disk space, security rule or pluginwp-content/uploads, hosting disk usage, firewall logs
Upload succeeds but thumbnails are missingImage library failed after uploadImagick or GD, PHP error log
Started after a plugin or theme updateConflictRecently updated plugins
Started after moving hostDifferent limits, missing PHP extensions, ownershipSite Health, hosting PHP settings
Only WebP, AVIF or HEIC failsServer library does not support the formatSite Health media information

Check 1: Retry, and test with a small image

A brief connection drop or a session timeout can cause a one-off failure. Before anything else:

  • Wait a minute and upload the same file again.
  • Log out and back in, in case your login session expired.
  • Try a small JPG of a few hundred kilobytes. If that works, the problem is the size of the original image.
  • Try another browser or a private window, to rule out an extension interfering.

Check 2: File size, dimensions and format

Phone photos are often several thousand pixels wide. Resizing them uses a lot of memory, because the image is decompressed in full before WordPress creates each smaller copy. A photo that is modest in megabytes can still need a lot of memory to process.

  • Resize photos to a sensible width before uploading. For most website use, a width around the largest size your theme displays is plenty.
  • Compress them; image compression plugins compared covers the options, and image optimisation for WordPress explains sizes and formats.
  • Check the file name. Rename files with unusual characters, spaces or very long names to simple lowercase names with hyphens.
  • If HEIC photos from iPhones fail, convert them to JPG or set the phone to save in a more compatible format.

Also check the maximum upload size shown on the Media > Add New screen. If your file is larger, the host's upload_max_filesize and post_max_size settings need raising, though WordPress usually shows a clearer message for that.

Check 3: Memory and time limits

If larger images fail and small ones work, the server is probably running out of memory or time while resizing. Open Tools > Site Health > Info > Server to see the PHP memory limit and max execution time.

You can raise WordPress's memory limit in wp-config.php, above the line that says to stop editing:

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

This only works up to the limit your hosting plan allows. If the host's PHP memory_limit is lower, change it in the hosting panel's PHP settings or ask the host. WordPress memory limit errors explains the different limits and where each is set. A slightly longer max_execution_time can help on slow shared servers too.

Check 4: The image library, Imagick or GD

WordPress uses Imagick if it is available and falls back to GD. On some servers Imagick runs with several threads and hits resource limits on shared hosting, which causes HTTP errors on larger images. Site Health > Info > Media Handling shows which library is active and which formats it supports.

A common test is to make WordPress prefer GD, using a small snippet in a custom plugin or a child theme's functions.php:

add_filter( 'wp_image_editors', function( $editors ) {
  return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' );
} );

If uploads start working, keep the snippet or ask your host to adjust Imagick's resource settings. If neither library is installed, thumbnails will not be created at all, and the host needs to enable one. Updating to a supported PHP version often brings newer library builds too; see how to update PHP in WordPress safely.

Check 5: Folder permissions and disk space

WordPress writes uploads to wp-content/uploads, in year and month folders. If the web server cannot write there, every upload fails.

  • Folders are normally 755 and files 644, owned by the hosting account user. After a migration, ownership can end up wrong even when the numbers look right.
  • Check Settings > Media: the "Store uploads in" path, if shown, should not point to an old server path.
  • Check your hosting disk usage. A full disk or an inode limit stops new files being written, and backups stored on the same account are a common reason the disk fills.

Check 6: Security rules and mod_security

Server firewalls such as mod_security, and security plugins, sometimes block upload requests they consider suspicious, for example because of a pattern in the file name or metadata. The result can be an HTTP error, or a 403 in the browser's network tab.

  • Open the browser's developer tools, Network tab, and upload again. Look at the status code of the async-upload.php request.
  • A 403 points at a firewall or permission rule; the 403 forbidden error guide covers how to find which one.
  • Ask your host to check the mod_security log for the time of your upload and whitelist the specific rule, rather than switching the firewall off.

The same firewall and security rules can also block the media library's background requests, leaving the grid stuck on a spinner even when uploads work; see how to fix a WordPress media library that won't load.

Check 7: Plugins and themes

Image optimisation, watermark, security and media library plugins all hook into uploads. If the error started after an update, test on a staging copy: deactivate plugins in groups, switch to a default theme and upload again. Troubleshooting plugin conflicts explains a safe way to do this. Themes and page builders that register many extra image sizes also increase the work done on each upload, so remove sizes you never use.

A safe order, and when to involve your host

  1. Retry, re-login and test a small JPG in another browser.
  2. Resize and compress the original image and rename it simply.
  3. Check memory and execution limits in Site Health.
  4. Test GD instead of Imagick.
  5. Check uploads folder permissions, ownership and disk space.
  6. Check the status code in the Network tab and ask the host about firewall logs.
  7. Test plugins and theme on staging.

Once uploads work, keep images light so the issue does not come back and pages load fast; the image SEO guide covers file names and alt text while you are at it.

Quick check: narrow down the HTTP error

  1. Upload a small JPG under 500 KB. If it works, the problem is file size or image processing, not uploads in general.
  2. Open Tools > Site Health > Info > Media Handling and check which image editor is active (Imagick or GD) and the maximum upload size.
  3. Deactivate any image optimisation or security plugin and try the original file again.

When to get help

Get help when every upload fails, when the error started after a hosting change, or when your host blames WordPress and you need the error log read. WordPress maintenance and support covers server settings and plugin conflicts. You can also hire a WordPress developer in India for a one-off fix, or send the details through the contact form.

FAQs

How do I fix the WordPress HTTP error when uploading images?

Retry, then test a smaller image. If small images work, raise memory and time limits or switch the image library to GD. If nothing uploads, check uploads folder permissions, disk space, firewall rules and plugins.

Why do only some images fail to upload?

Usually because they are very large in pixel dimensions, which needs more memory to resize, or because the format, such as HEIC or some WebP files, is not supported by the server's image library.

Is the HTTP error caused by my internet connection?

Occasionally a dropped connection causes one failed upload. If it happens every time with the same image, the cause is on the server or in WordPress.

Does the HTTP error damage my site?

No. The failed image may leave a partial entry in the Media Library, which you can delete, but your pages and content are not affected.

Should I ask my hosting company to fix it?

Ask them if the cause is a server limit, a missing image library, file ownership or a firewall rule, because those are on their side. Size, plugin and theme causes are things you or your developer fix inside WordPress.

Need help with your website?

I'm a freelance WordPress developer building fast, SEO-friendly websites since 2020. Tell me what you need and I'll reply with a plan and a fixed quote, usually within 24 hours.

Found this useful? Share it:
Contact

Let's build your next website

Available for freelance projects, agency white-label work and long-term maintenance. Feel free to pass this along to your team or company.

I reply within 24 hours, usually the same day. Your details are emailed to me, then WhatsApp opens so we can chat right away.

Chat now