-
AuthorPosts
-
August 21, 2022 at 1:21 pm #1362340
Hello,
The images on our server are being duplicated to a point that we are having over quota issues in a 10GB WP dedicated server.
I read a couple of threads where Josue is providing code to avoid this, but I am not sure which sizes I shall remove and how this will affect the site.
My client already updated 200+ products, so I can’t make any mistakes with this.Could you kindly have a look and let me know how to solve this?
Your help will be much appreciated!
Cheers,
Nasi
August 23, 2022 at 1:42 am #1362440Hey Nasi,
Thank you for the inquiry.
The theme automatically adjusts the compression level of the uploaded images, which could lead to increase in file size and consume more storage space. You can adjust the default quality by using this filter in the functions.php file.
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; }
Quality is set to 100 by default. And if you want to prevent the generation of multiple images or thumbnails, please check the following threads.
// https://kriesi.at/support/topic/how-to-reduce-thumbnails/#post-1360678
// https://kriesi.at/support/topic/enfold-image-sizes-3/#post-1109028
// https://kriesi.at/support/topic/portfolio-grid-alignment-issues/#post-1306849
// https://kriesi.at/support/topic/how-can-i-delete-all-enfold-image-sizes/Best regards,
IsmaelAugust 23, 2022 at 4:57 am #1362456Thanks Ismael, your help is much appreciated!
Will check all those links and also try your code.Thank You!
August 23, 2022 at 4:34 pm #1362524Hi,
Thanks for the update. Please let us know if you should need any further help on the topic, or if we can close it
Best regards,
RikardAugust 24, 2022 at 5:47 am #1362589Hi Rikard,
Just one more question: is there a way to know what image sizes are in use and which are not?
In Settings / Media I currently have 22 different image sizes and under Thumbnail regeneration there’s 26 items with different dimensions.
I’m quite sure we are not using them all.I understand if i apply this code I will be deleting them all, right?
function remove_enfold_image_sizes() {
// do NOT remove widget size, is used in backend portfolio items!
// remove_image_size(‘widget’);
remove_image_size(‘square’);
remove_image_size(‘featured’);
remove_image_size(‘featured_large’);
remove_image_size(‘portfolio’);
remove_image_size(‘portfolio_small’);
remove_image_size(‘gallery’);
remove_image_size(‘magazine’);
remove_image_size(‘masonry’);
remove_image_size(‘entry_without_sidebar’);
remove_image_size(‘entry_with_sidebar’);
remove_image_size(‘shop_thumbnail’);
remove_image_size(‘shop_catalog’);
remove_image_size(‘shop_single’);
remove_image_size(‘shop_gallery_thumbnail’);
}
add_action(‘init’, ‘remove_enfold_image_sizes’);how can I know which ones are not being used and which are?
Thanks!!
Nasi
August 25, 2022 at 8:20 am #1362724Hi,
is there a way to know what image sizes are in use and which are not?
It depends on the elements or shortcodes used in the site. If the site contains a Masonry element for example, the theme will display the masonry thumbnail by default, featured images on pages with sidebar will be displayed as entry_with_sidebar and so on. Please note that WordPress automatically falls back to the original version of the image if the specified thumbnail is not found, so it is quite safe to remove all registered thumbnails without breaking the site. But this will affect the site performance because every elements in the site will load a larger version of the image.
Best regards,
IsmaelAugust 25, 2022 at 8:20 am #1362725Hi,
is there a way to know what image sizes are in use and which are not?
It depends on the elements or shortcodes used in the site. If the site contains a Masonry element for example, the theme will display the masonry thumbnail by default, featured images on pages with sidebar will be displayed as entry_with_sidebar and so on. Please note that WordPress automatically falls back to the original version of the image if the specified thumbnail is not found, so it is quite safe to remove all registered thumbnails without breaking the site. But this will affect the site performance because every elements in the site will load a larger version of the image.
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.