Wordpress Image Upload time error : Post-processing of the image failed
Asked Answered
W

16

16

Facing an error while uploading images in Wordpress 5.3:

Post-processing of the image failed. If this is a photo or a large image, please scale it down to 2500 pixels and upload it again.

Whimper answered 14/11, 2019 at 3:42 Comment(5)
Have you tried uploading a smaller version (< 2500px) of your image?Grefe
@mommermi: Yes I tried several images with different px less than 2500px.Whimper
For me, it was Smush plugin. Deactivating it solved the issueJuvenescence
And in my case it was the WP User Avatar. I had to disable it.Dardanelles
Try this tool before uploading: iloveimg.com/compress-image It worked for me.Overelaborate
W
18

This same issue I faced after updating my WordPress to latest version 5.3. For a quick solution as of now, you can get over this by uploading the images to the media library first. Currently, if we are uploading images from anywhere else it’s showing the same issue. I hope it helps.

I have tested it on my own website.

Hopefully, team WordPress will fix this soon.

Whimper answered 14/11, 2019 at 3:42 Comment(2)
doesn't work for me. Tried with different sizes and dimensions and it seems that it's not able to handle images over 1.5Mb. In my case even increasing 2Mb php limit on uploads doesn't make any difference.Michelinemichell
Same error when uploading to media library first: nimb.ws/NEod5eOverelaborate
R
22

Fixed by increasing client_max_body_size to something like 100/200M(if you use nginx).

Reprise answered 2/12, 2019 at 22:2 Comment(2)
It works for me. I set client_max_body_size on nginx same as upload_max_filesize setting on php.Daloris
This was the solution for me, I am guessing that Nginx streams the file to PHP FPM so it needs to be able to handle the image size ( although my image was 1.1MB.Pironi
W
18

This same issue I faced after updating my WordPress to latest version 5.3. For a quick solution as of now, you can get over this by uploading the images to the media library first. Currently, if we are uploading images from anywhere else it’s showing the same issue. I hope it helps.

I have tested it on my own website.

Hopefully, team WordPress will fix this soon.

Whimper answered 14/11, 2019 at 3:42 Comment(2)
doesn't work for me. Tried with different sizes and dimensions and it seems that it's not able to handle images over 1.5Mb. In my case even increasing 2Mb php limit on uploads doesn't make any difference.Michelinemichell
Same error when uploading to media library first: nimb.ws/NEod5eOverelaborate
G
7

WordPress 5.3 introduces this feature but it a bug. Until a WordPress update is released with a fix for the error, this is how you can disable this.

Simple add this line in your child theme functions.php file.

add_filter( 'big_image_size_threshold', '__return_false' );
Galvanism answered 27/6, 2020 at 8:31 Comment(0)
P
5

Just encountered this bug. There was an apostrophe (') in the image's filename - once I removed it, all was fine.

Planetarium answered 15/11, 2019 at 13:34 Comment(1)
I had the same issue, just removed some dots(.) in the file name and the problem solved. A strange thing!!Hash
M
5

Uploading from incognito window solved my problem. WordPress 5.3

Mazuma answered 31/12, 2019 at 10:57 Comment(3)
older question... be more specific, like mentioning versions, etc.Estrous
It worked for me. It'd be nice to know why this helps.Legislator
Did not work for me.Overelaborate
A
1

Here is one more step to help you debug. Have your inspector open to the network tab and look at the post request and its response. enter image description here

In our case the issue was a bad AWS IAM policy not allowing uploads to the S3 bucket.

Only viewing the message there was what lead us in the right direction to fix the issue. The WordPress error is pretty generic for (server did not respond with success).

Adan answered 22/5, 2020 at 16:48 Comment(0)
N
0

I recently received this error because I had already uploaded an image with the same filename. I don't know why it couldn't say something accurate like "duplicate file name" instead of something wrong and meaningless like "if this is a photo or a large image, please scale it down to 2500 pixels and upload it again."

Newsletter answered 16/11, 2019 at 21:20 Comment(0)
M
0

I got this error but it wasn't a Wordpress nor a php problem. If you are using nginx be sure that the setting client_max_body_size is not set to the default 1M (which means 1Mb only for images passed in a POST not using multiform/part). I increased it and everything worked fine.

Michelinemichell answered 30/11, 2019 at 17:54 Comment(0)
E
0

I have another solution for this, just had this problem gladly could figure how.

First see if your handling PHP 7.1 further

Then, you need enable mbstring in cPanel

In servers having a cPanel, it is easier to enable mbstring. So, for cPanel customers we enable mbstring as follows:

Firstly, we login to the cPanel account. Next, we go to the Software section. Here, we click the drop-down to Select the PHP version. Now, select the PHP extension mbstring. Finally, click the save button.

Image to what to select in PHP Version

enter image description here

Epilogue answered 2/12, 2019 at 16:24 Comment(0)
N
0

Updating php to latest version , plus activating imagick module on from cpanel > select php version fixed the issue ...

Nagging answered 4/1, 2020 at 7:35 Comment(0)
F
0

Just thought I'd add my two cents since I stumbled across it looking for a solution myself before finding one. Now I've just experienced this exact same issue from around the web and it seems specifically related to Wordpress in versions of PHP 7.2+ or something which requires the installation of "Imagick" as well which for Redhat/Centos can be done like so: dnf install php-pecl-imagick

I was able to use this to get the files to upload again though I still had some other issues which were resolved by updating the a lot of the limits of PHP via this guide: https://websiteforstudents.com/fix-file-upload-issues-with-wordpress-running-on-nginx-on-ubuntu/

Feer answered 18/6, 2020 at 9:57 Comment(1)
I set the imagick , upgrade php version to 7.4, and increase upload_max_filesize after refresh page, fixed this issue.Knife
L
0

Yet one more possibility ... after trying all these other solutions with no luck, I checked the console and was getting a 500 error on the js upload script. This was due to some code in functions.php that "worked" in older php versions but not 7.4. Non-helpful error message.

Libna answered 8/4, 2021 at 20:30 Comment(0)
S
0

mageMagick (part of php) is causing the problem. So, i just added this lines to wp-includes/functions.php to tell WordPress to use GD editor instead.

add_filter( 'wp_image_editors', function() {
    return array( 'WP_Image_Editor_GD'); } );
Sateen answered 15/8, 2021 at 13:57 Comment(0)
M
0

The simplest way to tackle this problem is to change the php version from 8 to 7.4. The complete details are in this article Post Processing of image failed

Monica answered 18/9, 2021 at 15:52 Comment(0)
S
0

enter image description here

For SVG files, the number of these curves or shapes should not be too many.

enter image description here

Stempien answered 14/11, 2021 at 6:44 Comment(0)
M
-2

I had the same error and tracked it down to my password-protected wp-admin directory. Removing the password-protection solved it. (The password protection adds lines in htaccess in wp-admin, you can also remove those).

But I did not want to take the password protection away. What solved it for me, while keeping wp-admin password-protected was adding the following in the .htaccess at site root level (so not in the htaccess file in wp-admin):

# Exclude the file upload and WP CRON scripts from authentication
<FilesMatch "(async-upload\.php|wp-cron\.php|xmlrpc\.php)$">
    Satisfy Any
    Order allow,deny
    Allow from all
    Deny from none
</FilesMatch>

Solution (and other solutions for other situations) found here:

https://docs.presscustomizr.com/article/229-fixing-errors-when-uploading-images-in-wordpress

Mercier answered 11/12, 2019 at 17:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.