Tagged: thumbnails, woocommerce
-
AuthorPosts
-
January 7, 2021 at 12:59 pm #1270854
Hi from Slovakia. I use Enfold for our online shop. Everything is OK but I have one problem. Online shop: 1200 products – uploaded 5000 multimedia files / size of one on average 300-400 kb. Nevertheless, our online shop is over 20 GB in size (18 GB uploaded multimedia files) (!) We checked the installed plugins, but we didn’t find a problem. Could this be a problem with the template? Doesn’t it make many copies of different thumbnails? (5000 multimedia files have been uploaded, but EWWW Image Optimizer show over 100000…) Do you know the solution? Thanks for reaction.
January 8, 2021 at 4:51 pm #1271108Hey Tomasssu,
Thank you for the inquiry.
The theme register its own thumbnails and whenever you upload a product image, these thumbnails are automatically generated as well which is probably why the images takes up that much space in the server. If you don’t need those thumbnails, you can manually remove them using the following snippet in the functions.php file.
// Disable loads of Enfold & WP image sizes upon upload add_action('init', 'remove_enfold_image_sizes'); 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'); }
After adding the snippet, use the following plugin to regenerate the images, which should also remove the unregistered thumbnails.
// https://wordpress.org/plugins/regenerate-thumbnails/
IMPORTANT: Please do not forget to create a backup or a restore point before doing the above steps.
Related thread: https://kriesi.at/support/topic/media-upload-and-enfolds-thumbnail-sizes/#post-1270140
Best regards,
IsmaelJanuary 8, 2021 at 6:13 pm #1271129Hello,
thanks for reaction. I try to manually remove them using the following your snippet in the functions.php file but nothing happened. Please, can You try it? (We have backup.)Best regards,
TomášJanuary 11, 2021 at 7:22 am #1271503Hi,
Thank you for the update.
I try to manually remove them using the following your snippet in the functions.php
Adding the snippet in the functions.php file will only deregister the thumbnail sizes but it will not remove those that are already generated. To remove the existing thumbnails, you have to regenerate the images using the plugin (Regenerate Thumbnails) that we suggested above. This process might take a while depending on the number of images uploaded in the site, and since the site contains many, expect it to take some time.
IMPORTANT: Please do not forget to create a backup or a restore point before proceeding with the thumbnail regeneration.
Best regards,
IsmaelJanuary 12, 2021 at 12:02 pm #1271847Hi,
sorry for that.. I try it and it really works! Thank You very much.Please, can You advise me a plugin for deleting unused images? (For example photos of old=out of shop products.)
And if I delete image from multimedia library, will be automatically deleted his thumbnails?Thanks!
January 15, 2021 at 8:44 am #1272615Hi,
Glad to know that the solution that we provided above works.
To delete unused images, you could either do it manually by deleting the image from the Media > Library panel — this will also delete the thumbnails for that particular image — or use the following plugin.
// https://wordpress.org/plugins/media-cleaner/
Again it is very IMPORTANT that you have a site backup or a restore point before using the plugin.
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.