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 difficult to decipher. In this article, we’ll discuss some ways to resolve this issue.
Reduce the size of the image
If the image has a large number of pixels, reducing its size may resolve the upload error. The pixel size required will vary depending on a number of variables, so start by reducing the file size to something small like 300×200 and see if that resolves the issue. If it does, experiment with different pixel counts to find a size that is of an acceptable quality and does not 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 of the changes described below.
Note that these edits will only work if the additional memory is available on the web server and the edits should only be made by savvy administrators. 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’ );
For more on editing the wp-config.php file, check out this link.
Edit the value defined for php_value memory_limit
php_value memory_limit 512M
Note that the .htaccess file is not a WordPress file. For more on editing the .htaccess file, check out this link.
Edit the value defined for memory_limit
memory_limit = 512M
The php.ini file is not a WordPress file. If you are 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.
For more detailed information on how to edit the .htaccess file, check out this article.
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 for.
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. This plugin has generally positive reviews (4.5 stars as of this writing) and over 80,000 active users according to WordPress.org.
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, there are a few steps you can take 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.
For further questions or if you need help, please open a support ticket from your HostPapa Dashboard. Follow this link to learn how.