The HTTP image upload error is related to loading images to a WordPress site through the WordPress dashboard. The associated error message “HTTP error.” on its own can be somewhat tricky to decipher. In this article, we’ll discuss some ways to resolve this issue.
Reduce the size of the image
The pixel size required will vary depending on several variables, so start by reducing the file size to something small like 300×200 and see if that resolves the issue. If the image has a large number of pixels, reducing its size may determine the upload error. If it does, experiment with different pixel counts to find an acceptable size that doesn’t create the error.
Windows users can use the Paint application to resize an image:
- Open the image.
- Select Resize.
- Click the Pixels radio button.
- Change the values in the Horizontal and Vertical fields.
- Click OK to save the image.
Mac users can reduce the number of pixels in an image by opening the file in Preview and selecting Tools > Adjust Size.
Verify and increase PHP memory limit
Increasing the memory allocated in the wp-config.php, .htaccess, or php.ini file may resolve HTTP image upload errors. Be sure to record the original settings in each file and backup WordPress before making any changes described below.
Note that these edits will only work if the additional memory is available on the web server, and savvy administrators should only make the edits. If you are uncomfortable making any of these edits, please contact our support team.
Start by trying to edit the wp-config.php setting. If that does not resolve the issue, try editing the .htaccess value, and if that does not resolve the issue, try editing the php.ini value.
Below are examples of the edits required to allocate 512MB of memory in each file. The actual amount of memory required will vary depending on the application.
Edit the value defined for ‘WP_MEMORY_LIMIT’:
define( 'WP_MEMORY_LIMIT', '512M' );
Edit the value defined for php_value memory_limit:
php_value memory_limit 512M
Note that the .htaccess file is not a WordPress file.
Edit the value defined for memory_limit:
memory_limit = 512M
The php.ini file is not a WordPress file. If you’re unfamiliar with how to edit it, contact our support team.
mod_security is an open-source firewall that could be creating the HTTP image upload error. mod_security can be disabled by adding the code below to the .htaccess file on the server.
Note that cPanel users can disable mod_security in the Security menu by selecting Modsec Manager and unchecking the box for the domains they wish to disable mod_security.
Use the “Add From Server” plugin
The Add From Server plugin is an open-source plugin created by Dion Hulse and designed to allow users to work around these sorts of errors. Files are uploaded to the webserver and then imported into WordPress. According to WordPress.org, this plugin generally has positive reviews (4.5 stars as of this writing) and over 80,000 active users.
Disable conflicting plugins
A conflicting plugin could be creating HTTP image upload errors.
If the errors only began after a specific plugin was installed, try disabling that plugin first and see if the issue persists.
Otherwise, the fastest way to determine if a plugin is creating an issue is to disable all plugins and see if the issue persists. If this resolves the issue, proceed with enabling them one by one to see which plugin caused the problem.
Once you have identified the conflicting plugin, you can take a few steps to try and resolve the issue. A relatively easy fix is uninstalling and reinstalling the plugin. If that doesn’t work, try contacting the plugin’s developer or support team. They may be able to help you resolve the conflict quicker than you could troubleshoot on your own. If the plugin’s support team can’t help you fix the problem, uninstall the plugin and install an alternate one that offers similar functionality without creating the HTTP image upload errors.
If you need help with your HostPapa account, please open a support ticket from your dashboard.