WordPress "HTTP Error" When Uploading Images: How to Fix It (2026)

WordPress HTTP Error Uploading Images - WordPress error fix

You drag an image into the Media Library and see only: HTTP error. That message says almost nothing, which makes it frustrating. The cause is usually low PHP memory, a very large image, a problem with the image library, or folder permissions.

The Short Version

  • "HTTP error" is a generic message. Test the simple causes first.
  • Try a smaller JPEG with a simple file name, such as test.jpg.
  • Raise the PHP memory limit, and check the upload size limits.
  • Switch WordPress from Imagick to the GD image editor, and check the uploads folder permissions.

Why This Error Happens

  • Low memory. Resizing a large image can use a lot of PHP memory.
  • Very large image. A huge pixel size can exceed server limits even if the file size looks small.
  • Image library trouble. The Imagick library can fail on some servers.
  • Upload limits. The file is bigger than upload_max_filesize or post_max_size.
  • Permissions or space. WordPress cannot write to wp-content/uploads, or the disk is full.
  • Security rules. A plugin or host firewall blocks the upload.

Step 1: Try a Smaller, Simply Named Image

Resize the image on your computer, save it as a JPEG, and use a name with only letters and numbers. If this works, the original file was too large or had a problem with its name.

Step 2: Raise the Memory Limit

Add this line to wp-config.php, above the line that says “That’s all, stop editing”:

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

Some hosts cap memory no matter what you set. See our memory limit guide for more options.

Step 3: Check the Upload Limits

If your file is large, read our upload limit guide. It explains upload_max_filesize and post_max_size.

Step 4: Switch to the GD Image Editor

Add the snippet below with a code snippets plugin. A snippet plugin is safer than editing your theme files, because it survives theme changes. It tells WordPress to use the GD library instead of Imagick:

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

Try the upload again. If it works, the Imagick library on your server was the cause. You can also ask your host to fix Imagick.

Step 5: Check Folder Permissions and Space

The wp-content/uploads folder should normally be 755. Also check that your hosting account still has free disk space.

Step 6: Test Plugins

A security or optimization plugin can block uploads. Switch plugins off one by one, or follow our plugin conflict guide.

Verified Facts and Sources

Checked in December 2026. The WordPress developer documentation describes the wp_image_editors filter, which sets which image editor classes WordPress may use, and lists WP_MEMORY_LIMIT as a wp-config.php setting.

Frequently Asked Questions

Why is the error message so vague?

WordPress shows a generic message when the server stops the upload without giving a reason. The real reason is in the server error log.

Does the image size in pixels matter?

Yes. A very large image in pixels needs a lot of memory to resize, even when the file size looks small.

Is it safe to switch to the GD image editor?

Yes. GD is a standard PHP image library that WordPress supports. Imagick often gives better quality on some setups, so switch back if your host fixes it.

Where do I find the server error log?

Your hosting panel usually has an Error Log page. You can also turn on WP_DEBUG_LOG, which our plugin activation guide explains.

Updated December 3, 2026.

Similar Posts

Leave a Reply

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