Reputation: 10240
Each time I try to upload an image using the WordPress Media Uploader (WP Admin > Media > Add new) the upload stalls at around 13% and I get an error message appear on screen "HTTP error"
.
So far I have created a php.ini file in my WordPress root with the following:
memory_limit = 256M
upload_max_filesize = 16M
post_max_size = 64M
I've also put a php.ini file in my /wp-admin/ folder (an exact duplicate of the above).
After checking with phpinfo()
I can see these changes have taken effect but they have not resolved the 'HTTP error' problem I am getting.
I am using a 1and1.co.uk dedicated server (managed) so don't have root access. 1and1 have confirmed plain CGI is enabled on the server (not Fast CGI if that makes much difference?).
Why might this error be happening? Is there anything else I can do to try to resolve it?
UPDATE: I have done some testing using different browsers and different devices:
Acer Aspire One netbook
Acer Aspire 5552 laptop
Google Nexus 7 tablet
Samsung Galaxy G4 Mini
As you can see the problem only exists in Chrome, FF and Safari on my Acer Aspire One netbook. What could be the source of this problem?
Upvotes: 5
Views: 19188
Reputation: 2253
Put below code in your activated theme's functions.php file.
If your media uploader gives HTTP error while uploading image, Try to change graphic library using below filter.
Below filter used for change the graphic library.
I hope it's help you.
add_filter( 'wp_image_editors', 'change_graphic_lib' );
function change_graphic_lib($array) {
return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' );
}
Upvotes: 1
Reputation: 875
Put this is your themes function.php It's Working.
add_filter( 'wp_image_editors', 'change_graphic_lib' );
function change_graphic_lib($array) {
return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' );
}
Upvotes: 0
Reputation: 21981
I had an issue where any files over 100k were failing. The following worked for me:
Add the following line to fcgid.conf:
FcgidMaxRequestLen 52428800
Upvotes: 0
Reputation: 1
it easy to fix. just click right button in picture, properties and than unblock picture, its on the bottom. that will work. I tried all other thinks from forums and nothing. works on windows 10
Upvotes: 0
Reputation: 187
I put the following code into my functions.php file. It works!
add_filter( 'wp_image_editors', 'change_graphic_lib' );
function change_graphic_lib($array) {
return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' );
}
Upvotes: 10
Reputation: 23
I use the Hiawatha web server, and in my case, the issue was MaxRequestSize
and MaxUploadSize
values being set too small.
I've solved it by adding this to my /etc/hiawatha/hiawatha.conf
:
Binding {
Port = 80
MaxRequestSize = 1000000
MaxUploadSize = 550
}
Binding {
Port = 443
SSLcertFile = /etc/hiawatha/serverkey.pem
MaxRequestSize = 1000000
MaxUploadSize = 550
}
Upvotes: 0
Reputation: 441
Try to edit link. in my case, it solve with changing name. Initially it is "webpic'1_1.jpg" and i removed " ' " and changed to "webpic1_1.jpg". It worked !...
Upvotes: -2
Reputation: 1003
Just install plugin from here https://github.com/getsource/default-to-gd, and forget the error.
Upvotes: 0
Reputation: 1831
It's a browser issue. WordPress media uploader uses JavaScript and it seems that some of the browsers you tested don't work well with such uploader.
You always have a link on add new media page to a non-javascript upload. Test that and see if the problem persists.
We commented my first idea, and it isn't a browser issue.
So, if it's something related to the backend, I guess you should start checking type and size of images. Access to server logs should help you a lot.
Using Apache, directive MaxRequestLen
is always an important factor. Did you check that?
Upvotes: 0
Reputation: 8218
I have often had problems with the (IMHO) very finicky media uploader of WordPress. And almost without fail, they are jpegs. And I can almost always solve the problem by opening them in Photoshop and using the "Save for web..." command which, among other things, removes embedded icon previews and performs other optimizations. For some reason, that almost always works for me. Which leads me to believe that there is something in the files themselves that WordPress is choking on, not always related to size (although that can sometimes be a problem).
Upvotes: 1
Reputation: 1
You might want to try this: Upload the big images (using FTP or CPanel) to wordpress folder/wp-content/uploads/2013
or something like this.
Then try to add these images to your wordpress site (post featured image/product image or others). You'll find the images at the left side under "uploaded images or all images".
Upvotes: -1
Reputation: 17561
Try a smaller image - both file size and display size - and see if you can upload it.
mod_security
might be causing problems. Disable it to see if that is the problem.
Make an .htaccess file in your wp-admin directory. Add this to it:
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
Upvotes: 0