Support » Fixing WordPress » Error with image uploading

  • Resolved Mohamed Adel

    (@madel28)


    I have got the below error and It was not found before. and the image I upload it less than 2500px and still seeing this message:

    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.

    I add this
    add_filter( ‘big_image_size_threshold’, ‘__return_false’ );
    to functions.php and installed Disable “BIG image” Threshold

    nothing fix the problem, What should I do?

Viewing 15 replies - 1 through 15 (of 38 total)
  • Hi,

    There are a few solutions to this issue. First, are you running PHP 7.3 and WordPress 5.3? You may try downgrading to PHP 7.2.

    Next, you may try increasing your site’s memory limit. https://haydenjames.io/understanding-php-memory_limit/

    If neither of these works you may attempt to work around it.

    1. Go to your media library and select any picture. Preferably one that you managed to upload successfully. Click Edit and look at where the picture is located. keep this open or remember it.

    2. Connect to your server via a FTP client and navigate to this folder where your images are stored. Upload your large photographs to this folder.

    3. They won’t show up in your media library yet. You need to use a plugin called ‘Add From Server’. Download that and install/activate it (by Dion Hulse).

    4. Backup your WordPress installation (just in case).

    5. Finally, hover over Media and then select the new option = Add From Server

    6. Navigate to the folder where you uploaded your photo’s to. Make sure you select just the photos you want to import into your Media Library (although you could delete the duplicates if you make a mistake).

    7. After you click go, it’ll take some time, but don’t cancel it or refresh the page. Just wait, and you’ll get a notification on the same screen when it’s done. Along with a new list of imported files (including size variations if applicable).

    8. Now your photos will be in your media library with ‘scaled’ at the end. You can now use these in your posts and they will work just fine.

    NOTES
    The files are imported to wherever you select them from. So it’s important that you put them in the same folder as the rest of your active pictures BEFORE you import them. Other wise they’ll show up in the media library, but won’t actually work on your website (took a while to figure this out).

    I’d recommend importing 10-15 pictures at a time if they are large. Any more and you risk being signed out of your cPanel due to inactivity and it may break your installation (maybe, hence the backup).

    Also, you may look through this wordpress.org thread as many solutions are discussed in the thread. https://wordpress.org/support/topic/unable-to-upload-images-67/page/5/

    Let me know if this helps!

    I am using now PHP 7.4, and the only thing work with me is Add From Server Plugin
    Thank you for your support

    • This reply was modified 8 months, 3 weeks ago by Mohamed Adel.

    Hi
    I had the same error as you @madel28 The issues I had was that I was missing the imagick PHP module and mod_fcgid in the Apache modules. I have written a short manual here on how to turn it on if you are the admin of your web server.

    Thank you, “Add From Server” worked for me.

    ahcreative

    (@ahcreative)

    We tried almost all of the suggested fixes. this is the solution that worked for us: We are running on budget cpanel hosting, running php 7.2 and using the latest version of wordpress 5.4. Our hosts had switched the php manager without telling us.

    In our case, ImageMagick (part of php) is causing the problem. So, i just added this lines to functions.php to tell WordPress to use GD editor instead.

    function use_gd_editor($array) {
    return array( ‘WP_Image_Editor_GD’, );
    }
    add_filter( ‘wp_image_editors’, ‘use_gd_editor’ );

    @joshben

    Thank you for the ‘Add from server’ option. I am kinda low tech compared to many here, but you posted that in a way that was easy to understand. And it worked!

    Cheers

    aequalsb

    (@aequalsb)

    @ahcreative Thanks!

    my contributions:
    1. you need to reload whatever screen you’re working on before attempting to upload files (ie: media screen, edit page screen, etc)

    2. you can fit the solution in a one-liner:

    add_filter( ‘wp_image_editors’, function() { return array( ‘WP_Image_Editor_GD’ ); } );

    thanks again 🙂

    • This reply was modified 5 months ago by aequalsb.

    How many people work on WordPress development?
    How many contributors are there?
    And you wonder how they ship an update with such an issue!
    I’m disappointed.

    Every suggestion in this page, is a “Work Around” which does not fix the problem! How is this post marked as resolved?

    BTW, anyone who still have this problem, can you check if other file/folder manipulation by WordPress works or not?
    For example can you delete a plugin from plugins.php?

    Also, is some cases, a plugin conflict may cause this. Such as “WooCommerce Advanced Bulk Edit”. Try disabling your plugins one by one to see if it works.

    • This reply was modified 4 months, 2 weeks ago by pgDarkness.
    • This reply was modified 4 months, 2 weeks ago by pgDarkness.

    @ahcreative, bypassing GD Editor did the trick. Thanks!

    After I upgraded to WordPress to version 5.4.1, a “Site Health Status” box appeared on my dashboard. This tool suggested that I should install the Imagick PHP module. Previously image uploads were working fine. After installing Imagick, all image uploads failed with the above error.

    After trying out various solutions, the thing that finally fixed it for me and got image uploads working again was to install the “ImageMagick Engine” plugin. I’m not really sure why. I currently have Imagick Engine configured to use the Imagick PHP module, but it also works if I untick the “Enable enhanced image engine” box.

    lastrowmusic

    (@lastrowmusic)

    I have to say that even after increasing my site’s memory limit a few days ago, this issue is still occurring. Yesterday’s image uploading was fine. But all of sudden today’s (6/23/20) images are showing this error message again. Going to try a few plugin options listed above. Very frustrating.

    Update: So the Add from Server features works very well. Thanks for that suggestion. But it is a lot of extra steps that we didn’t have to do. I did notice that I updated three plugins this morning and wondered if that had anything to do with it. Either way, I am back in sync with uploading images now.

    Alguém com mais luz sobre isso? No meu caso tenho o Image Magick instalado no meu servidor, e selecionei a ativação no módulo do PHP, e nada de habilitar.
    Parece que no meu caso o problema está aplicado a este módulo.

    This happened to me after upgrading from PHP 7.0 to 7.2 but only when attempting to upload SVG media files (with SVG Support plugin installed).

    Apache was causing Fatal error behind the scenes:
    PHP Fatal error: Uncaught Error: Call to undefined function simplexml_load_file()

    My fix was to install php7.2-xml and restart Apache.

    The error that came to my side is “Post-processing of the image failed likely because the server is busy or does not have enough resources. Uploading a smaller image may help. Suggested maximum size is 2500 pixels” when uploading the image but there was a different error when uploading the pdf document.
    Solution: I solved the problem by removing the single quotation character that was in the name of the file and has replaced it with the underscore character. Then when I uploaded the image or the document again, things work perfectly.

    Thanks (@jeanbonfils) !! it was a freakin apostrophe in the title that’s all. After trying plugins as recommended and some other workarounds, no joy… then just renamed file – no bother! WordPress bug? how long? has this always been there?

Viewing 15 replies - 1 through 15 (of 38 total)
  • You must be logged in to reply to this topic.