-
AuthorPosts
-
March 17, 2020 at 5:24 pm #1193858
If I upload JPG image (800 x 800 – 163KB) with Enfold active, the resulting files are almost 4 times larger than if I upload the same file having switched the theme to “2020” default theme.
Only plugin is “Classic Editor”Original: 800×800 – 163KB
Enfold
300×300.jpg 90KB
768×767.jpg 516KB2020 Theme
300×300.jpg 25KB
768×767.jpg 157KBIs there anything I can do to fix this?
- This topic was modified 4 years, 9 months ago by BruceJackson.
March 20, 2020 at 6:09 pm #1194848Hey BruceJackson,
Please have a look at the following thread:
If you need further assistance please let us know.
Best regards,
VictoriaMarch 20, 2020 at 6:38 pm #1194860Hello Victoria,
thank you, but that only refers to reducing how many image versions are generated, not the size of the individual files.
My problem with Enfold is that the created file-sizes are much larger with Enfold active, compared to other themes.
I tried a solution I found on another forum without success:function av_return_compression(){ return 85; }
add_filter(‘jpeg_quality’, ‘av_return_compression’);
add_filter(‘wp_editor_set_quality’, ‘av_return_compression’);Generated images with Enfold are still roughly 4x larger than with default WordPress Theme.
This is easy to test – just upload any image via Media Library with Enfold active, then rename the file and upload it again with TwentyTwenty active. The second versions files will be much smaller.
March 24, 2020 at 7:21 am #1195660Hi BruceJackson,
Have you placed the code in a child theme?
If you don’t have it yet, then please download it here (instructions are also in the link): https://kriesi.at/documentation/enfold/child-theme/
If you have already and placed the codes in the child theme’s functions.php then try to manually replace all the single quotes.
Also the default compression of WordPress is 82.Best regards,
NikkoMarch 24, 2020 at 9:08 am #1195696Child theme was already active – and I also tried 75%, that made no difference.
I tested this in another website today also with Enfold and see the same problem, so it is easy to test!The difference is always the same – images are 4 times larger.
Have you tested this?March 24, 2020 at 9:36 am #1195920Hi BruceJackson,
Yes, I have tested it and this code works on my end:
function av_return_100(){ return 82; } add_filter('jpeg_quality', 'av_return_100'); add_filter('wp_editor_set_quality', 'av_return_100');
We have already posted this issue to our devs.
Best regards,
Nikko -
AuthorPosts
- You must be logged in to reply to this topic.