WordPress is the largest CMS used all around the world. As it is easy to create a website in WordPress and add several features into it through a large variety of plugins available. At the same time, it throws you lot of errors, frequently.
Users are fortunate, that though a large number of users, the community is quite huge and errors are always been solved.
One of the errors amongst them is HTTP error while uploading images in WordPress Website. This could be frustrating at times. As it looks like things are not working out without any reason. I got this error while writing this article WordPress vs Blogger Comparison.
check out how it looks like in the below image.
There could be several reasons why you would be facing the HTTP error while uploading images. Sometime conflicts between the plugins may also be resulting in that error. Here, we will look at some possible ways to solve this issue, and not to appear again n again.
Table of Contents
How To Fix HTTP Error while Uploading images in WordPress Website
Though all the ideas are going to simple to get rid of it. Let’s go with the most simple one.
Fix 1. By Changing the File Extension
Change the Image format .png to .jpg and similarly vice-versa and simply re-upload again to your WordPress website.
If this doesn’t work, let move to the second one.
Fix 2. Through Plugin
Fix HTTP error by using a plugin. Simply Install a plugin called Default to GD from Github
Click on the Clone or Download Button, and then click on Download ZIP to download the plugin.
If this doesn’t work, then you can make the plugin as well on your own. Below is the source code for the same.
Copy this code, Go to your server root directory and find wp-content – Plugins.
Simply create a directory as “default to GD,” and then create a file into it as default-to-GD.php and add the above code into it.
That’s it, you are done, and won’t be receiving any HTTP image error going further.
If, this sounds complex, check the other ones
Fix 3. By Adding code in Functions.php
You can also add a snippet to your theme as well.
Navigate to your Appearance – Editor, and then find “functions.php” file and add the below code at the bottom.
Fix 4. Increase PHP Memory
You can always contact your hosting provider to do the same to increase the PHP memory.
But, I would say, do it yourself by simply adding the code in the WPConfig.php file.
This action will increase the WordPress PHP memory limit if restricted. You can try changing it to 256M as well to get the issue solved.
5. Via .hta access
You can also make it through the .hta access file by adding a small snippet.
Add the below code at the top of the .hta access file
Final Words on HTTP Image Error:
These WordPress tricks work great. After getting that error, I have tried all and fortunately, all are working. Get rid of that freaking error.
Do let me know which one you tried and worked for you? Share it around, if this helps. Thanks!