Viewing 23 posts - 1 through 23 (of 23 total)
  • Author
  • #1086731

    I’m now getting Fs on image sizes and speed time

    I optimize images before upload to small image sized ie 80kb and then use the premium version of Imagify plugin to further compress post uploading and the resized images are 2-5 times the size of original going to like 300k, even when pulling the same sized image (page image 950x 1000) This is serious,
    No one can help us. Another plugin only compresses 15% or so, these files in WP?enfold are auto-generated 300x the size, its beyond any plugin post proceesing compression ratios.


    Hey SakuraD,

    Can you try adding this php code in functions.php:

    function av_return_100(){ return 80; }
    add_filter('jpeg_quality', 'av_return_100');
    add_filter('wp_editor_set_quality', 'av_return_100');

    Best regards,


    Hi Nikko,

    I followed your conversation with SakuraD because I also really have huge loading problems for a website with a lot of pictures.
    And even, if we optimize and compress images BEFORE upload, the images Enfold creates are heavier than the original ones.

    I now tried the code for functions.php you provided and as far I can see this works, so images created at least are not heavier than the original ones. So thank you for this solution.

    Now my question is: Why is this not implemented be default in ENFOLD? Also, I am not sure how to optimize everything now the Website already is created with these huge Enfold images… would I have to replace all of them again manually?

    I mean, I really love Enfold and would like to use it for many more projects, but at the moment the loading problem caused by images is really a pain…

    Thanks, Tanja


    Hi Tanja,

    First of all, thank you for using Enfold. :)
    This is not default since we want to make sure that there’s no loss in quality since there were some users that are complaining that images get blurry since the default value is 82 for wordpress and that function just make sure that there’s loss in image quality and it returns 100.
    As for replacing them all, you’ll just need to use Regenerate Image plugins (not the exact name) and it will regenerate all your images without manually doing it yourself.

    Best regards,


    Hi Nikko
    I did as you said, since i had the same problem. Now after regenerating thumbnails i see from my ftp that they are smaller than original file. Good!
    ….but If I inspected element in the online page, i still see old bigger file kb, why?



    Hi phoenixdivers-kohlanta,

    That most likely is due to caching.
    If you have a caching plugin please flush out the cache.
    Clearing browser cache might also help in this case.

    Best regards,


    yes sure, thanks.
    is there a way to control that code part?
    I mean, to control better or worse way of saving images?

    super thanks


    Hi phoenixdivers-kohlanta,

    The 80 in this code represents 80%, so if you change it to 70, which will make the quality less but file size less as well:

    function av_return_100(){ return 80; }

    Hope this helps.

    Best regards,


    So if i dont want to loose quality should be:

    function av_return_100(){ return 100; }
    add_filter('jpeg_quality', 'av_return_100');
    add_filter('wp_editor_set_quality', 'av_return_100');

    Hi phoenixdivers-kohlanta,

    Yes, you are correct but by default wordpress is using 82.

    Best regards,


    Hey Nikko, the code you provided doesn’t work for me. Images are still a lot bigger than the images I upload. Is there anything else I can do?


    Hi fecanimedia,

    Please try to add this function in the child theme:

    function av_return_60(){ return 60; }
    add_filter('jpeg_quality', 'av_return_60');
    add_filter('wp_editor_set_quality', 'av_return_60');

    Best regards,


    I came back to this issue because I have been replacing smaller images to the whole website in order to optimize it.
    I noticed that all the thumbnail generated are way bigger than original.
    I added to the child as suggested above.
    What else Can I do?


    Hey Nikko and others – following this topic:
    there is that new filter: avf_responsive_images_defaults – which i do not get to work.
    you see that changing the two original files will end in much smaller calculated Images.

    Maybe Günter knows how to get the filter work


    Hi Daniele,

    Can you try the snippet by Ismael or Guenni007 in ?
    Just change the $quality value.

    @guenni007 thanks, I have tested the snippet and it worked pretty well on my end.

    Best regards,


    Which is exactly the snippet and where do I have to paste/edit it?
    Sorry I am not a master in programming


    Hi Daniele,

    Try this one:

    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 = 65;   // compression level what you like in percent
    	return $quality;

    Best regards,


    in quick CSS?


    Hi Daniele,

    No, put in your child theme’s functions.php file.

    Best regards,


    Perfect it worked.
    Should I wish to have higher quality in generated images, what do i need to change?
    higher than 65?



    Hi Daniele,

    Yes, just change 65 to any amount just don’t make it more than 100. :)

    Best regards,


    Thanks again Nikko!


    Hi Daniele,

    You’re welcome :)
    Thanks for using Enfold and have a great day!

    Best regards,

Viewing 23 posts - 1 through 23 (of 23 total)

The topic ‘Resized images much bigger than original ones’ is closed to new replies.