![Check out Enfold](https://kriesi.at/wp-content/themes/kriesi/images/banner-enfold.jpg)
-
AuthorPosts
-
July 12, 2020 at 10:51 pm #1229804
Hi everyone,
As you know, Enfold/Wordpress creates 19 resized images for every image upload. I have noticed that nearly all of these automatically-generated files have larger — sometimes significantly larger — file sizes than the original.
In this example, https://prnt.sc/tghy4b the original file is only 120k (it’s 2508px wide), and the 2048px version is almost 5x the size.
I am running latest version of anything, and php is using imagick. Image optimizer plugins do not solve this issue.
Is there anything that can be done about this?
Thank you.
-
This topic was modified 4 years, 1 month ago by
perfectword.
July 14, 2020 at 6:12 pm #1230359Hey perfectword,
Please have a look at the following threads:
If you need further assistance please let us know.
Best regards,
VictoriaJuly 14, 2020 at 6:28 pm #1230367Thank you, Victoria, but, unless I missed something in those posts, these do not address my issue.
I want to keep all the thumbnails, but when they are created, many of them have file sizes considerably larger than the original. It is the file size issue that is problem.
I am running the latest version of everything, and php is using imagick. Image optimizer plugins do not solve this issue.
Is there anything that can be done about this?
Thank you.
July 15, 2020 at 4:56 pm #1230660Hi perfectword,
Here is a thread with a solution for you:
If you need further assistance please let us know.
Best regards,
VictoriaJuly 15, 2020 at 5:27 pm #1230669Yow. Thank you. That’s nutso, though. Forcing 100% quality on an image that has already been compressed doesn’t make any sense. It does not improve the quality of the original, and only makes the site harder to download using cellular data.
By way of comparison, an original image with a file size of 330k, for the 1320×748.jpg thumbnail / featured image, at 100% is bloated to 1 MB, and at 80% compression is reduced to 206k, with no visible difference in the image.
At any rate, thank you for finding that for me. Adding this to functions.php in the child theme was the answer. Compression rate is changed by adjusting where it says “return 80”. In this example, 80 is 80% compression.
/** * Sets the default image to 100% quality for more beautiful images when used in conjunction with img optimization plugins * * @since 4.3 * @added_by Kriesi */ function av_return_100(){ return 80; } add_filter('jpeg_quality', 'av_return_100'); add_filter('wp_editor_set_quality', 'av_return_100');
July 17, 2020 at 11:03 am #1231174Hi perfectword,
Glad we could help :)
If you need further assistance please let us know.
Best regards,
Victoria -
This topic was modified 4 years, 1 month ago by
-
AuthorPosts
- You must be logged in to reply to this topic.