HTTP Error when uploading images in WordPress – no thumbnail

Did you ever see HTTP Error when uploading an image in wordpress? Most of the times the images are uploaded but no thumbnail is created. And sometimes the images are not even uploaded. We are going to discuss about this right now!

There could be several issues that cause this error. First of all, we can assume that you don’t have enough memory for the script to be executed. So, try adding something like the following in your wp-config.php file:
define(‘WP_MEMORY_LIMIT’, ’64MB’);

In stead of 64MB you may need more, though you can’t exceed the limit that your host allows you to use :)

You may also read:  How to get start date of a week in JavaScript

If the solution doesn’t work, then open the .htaccess file from root of wordpress installation and add the following line:
AddType x-mapp-php5 .php

Third issue could be mod_security is enabled in your server. To overwrite the default, create a .htaccess file in your wp-admin folder and paste the following code in there:

SecFilterEngine Off
SecFilterScanPOST Off


Another main issue I suppose that your script is using ImageMagick library, but you need to use GD library to resolve the HTTP error. You need to force wordpress to use GD library in this case. To force you can use the following code:
add_filter( ‘wp_image_editors’, ‘force_to_use_GD’ );
function force_to_use_GD($array) {
return array( ‘WP_Image_Editor_GD’, ‘WP_Image_Editor_Imagick’ );

You may also read:  Limit one blog per user in a wordpress multisite

I hope one of the above should fix your issue. There are more possible options out there though, but these are the common ones :)

You may also like...

Leave a Reply

%d bloggers like this: