Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1302980

    I am trying to upload some 300k images into media but when I do they are 2MB – 3MB in size after upload. I deactivated all of the plugins but that didn’t do anything. Not sure where to begin.

    #1303020

    After I left the message above I updated WordPress to 5.7.2 and Enfold to 4.8.3, to the latest version. I am running Php 7.4.9. Now when I try to upload a large image it says, “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.”

    I think I see it now. It says “scaled” at the end of an uploaded image… In Media Setting a Large File is set to 2565 x 2565 and the image I’m trying to upload is 1985 x 2563. I would assume someone added code to functions.php to scale up images uploaded. I’m assuming this because I disabled plugins and there wasn’t a change after upload. If I’m correct, how would I find this code in functions.php?

    I don’t want any scaling to be done unless I activate a plugin. Is this possible?

    #1303305

    Hi,

    Please send us a temporary WordPress admin login and login URL so that we can have a closer look. You can post the details in the Private Content section of your reply. Also please let us know how we can reproduce the problem on your actual site.

    Best regards,
    Rikard

    #1303353

    I’m not really sure how to reproduce the problem. On the first line of the Masonry Gallery. I uploaded Actionrev-Brochure-Invoice-Item_1985x2563.jpg at 247kb and it changed it to Actionrev-Brochure-Invoice-Item_1985x2563-scaled.jpg at about 2mb. I then downloaded and and reuploaded Actionrev-Brochure-Dashboard-2-1.jpg. Nothing happened. It stayed at 109 kb

    #1303362

    it is a wordpress limitation : 2560px – all images bigger than that will be recalculated and saved as xyz-scaled.jpg ( or png etc )
    – Enfold creates some image-formats for their used elements ( see functions.php line 185ff : sizes )
    – on functions.php lines 246ff – you see that for these images a compression level is set to 100% – : no compression.

    That is the reason why the original jpg ( with 2560px width) might be smaller in file-size as the recalculated 1500px image ( featured_large or extra_large ).
    You can set this compression level by a small snippet in child-theme functions.php:
    e.g. for compression level 55%:

    add_filter("avf_jpeg_quality", "avf_set_quality_mod", 9999, 1);
    add_filter("avf_wp_editor_set_quality", "avf_set_quality_mod", 9999, 1);
    function avf_set_quality_mod($quality) { $quality = 55; return $quality;}

    This will only influence the uploading process. If you want the existing images have the same compression level you might use a “regenerate Thumbnails” Plugin afterwards.

    __________________

    PS: you can influence this big image threshold via a filter : big_image_size_threshold see here: Link
    f.e.:

    function increase_big_image_size_threshold( $threshold ) {
        return 3500; // new threshold
    }
    add_filter('big_image_size_threshold', 'increase_big_image_size_threshold', 999, 1);
    #1303542

    Hi,

    Thanks for sharing and for helping out @guenni007. Did you try out the suggestions above @actionrev?

    Best regards,
    Rikard

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.