-
AuthorPosts
-
April 4, 2019 at 4:45 am #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.
https://wordpress.org/support/topic/resized-images-much-bigger-than-original-ones/April 8, 2019 at 5:47 am #1088136Hey 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,
NikkoAugust 9, 2019 at 11:18 am #1126172Hi 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
August 9, 2019 at 2:44 pm #1126226Hi 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,
NikkoMay 31, 2020 at 12:28 am #1218093Hi 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?cheers
June 2, 2020 at 12:07 am #1218571Hi 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,
NikkoJune 5, 2020 at 4:33 am #1219655yes sure, thanks.
is there a way to control that code part?
I mean, to control better or worse way of saving images?super thanks
June 8, 2020 at 8:28 am #1220377Hi 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,
NikkoJune 8, 2020 at 6:12 pm #1220544So 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');
June 8, 2020 at 8:59 pm #1220639Hi phoenixdivers-kohlanta,
Yes, you are correct but by default wordpress is using 82.
Best regards,
NikkoNovember 14, 2020 at 1:04 pm #1260479Hey 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?
November 16, 2020 at 6:35 am #1260644Hi 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,
NikkoJanuary 10, 2021 at 11:03 pm #1271398Hi
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?January 11, 2021 at 12:07 am #1271400Hey Nikko and others – following this topic: https://kriesi.at/support/topic/media-upload-and-enfolds-thumbnail-sizes/
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
January 12, 2021 at 9:45 am #1271789Hi Daniele,
Can you try the snippet by Ismael or Guenni007 in https://kriesi.at/support/topic/media-upload-and-enfolds-thumbnail-sizes/#post-1271480 ?
Just change the $quality value.
@Guenni007 thanks, I have tested the snippet and it worked pretty well on my end.Best regards,
NikkoJanuary 13, 2021 at 2:43 am #1272001Which is exactly the snippet and where do I have to paste/edit it?
Sorry I am not a master in programming
ThanksJanuary 13, 2021 at 7:12 am #1272039Hi 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,
NikkoJanuary 13, 2021 at 9:12 am #1272074in quick CSS?
January 13, 2021 at 2:07 pm #1272163Hi Daniele,
No, put in your child theme’s functions.php file.
Best regards,
NikkoJanuary 14, 2021 at 4:15 am #1272294Perfect it worked.
Should I wish to have higher quality in generated images, what do i need to change?
higher than 65?Cheerd
January 14, 2021 at 4:24 am #1272296Hi Daniele,
Yes, just change 65 to any amount just don’t make it more than 100. :)
Best regards,
NikkoJanuary 15, 2021 at 11:01 pm #1272831Thanks again Nikko!
January 16, 2021 at 11:41 am #1272913Hi Daniele,
You’re welcome :)
Thanks for using Enfold and have a great day!Best regards,
Nikko -
AuthorPosts
- The topic ‘Resized images much bigger than original ones’ is closed to new replies.