Tagged: 

Viewing 22 posts - 1 through 22 (of 22 total)
  • Author
    Posts
  • #1049330

    Happy New Year Enfold Team! I hope you all had restful holidays.

    My site is approaching the WP Engine storage limit of 10 GB so I spent the holidays trying to figure out what’s going on. In short, it appears that Enfold saves 15 different files for each photo I upload for each of the 11 sizes in Enfold, plus an additional 4 that I’m not sure where they come from…. I read one thread that suggested they are for Woo Commerce which I don’t use. Those files really add up since my site is very photo intensive. Is there anything I can do?

    I always compress photos I upload with TinyPNG, and I also followed the instructions in this post from Ismael on changing the default upload quality back to 80 and re-generating thumbnails. That did not make much of a difference in my storage.

    Do you have any suggestions on what else I can try?

    Thanks!
    Rob

    #1049470

    Hey goldengate415,

    Thank you for using Enfold.

    You can use the Simple Image Sizes plugin to disable those thumbnails.

    // https://wordpress.org/plugins/simple-image-sizes/

    This article might help as well:

    // https://kriesi.at/archives/4-key-wordpress-image-optimization-tips

    Best regards,
    Ismael

    #1049652

    Hi Ismael,
    Thank you for the response!

    Is there a way to do this without a plugin? Modify functions.php in my child theme? And are there additional sizes generated by Enfold for Woo Commerce?

    Thanks!!
    Rob

    #1050161

    Hi,

    Add the following code

    function ava_image_sizes() {
    remove_image_size(‘masonry’);
    remove_image_size(‘magazine’);
    remove_image_size(‘widget’);
    remove_image_size(‘featured’);
    remove_image_size(‘featured_large’);
    remove_image_size(‘extra_large’);
    remove_image_size(‘portfolio_small’);
    remove_image_size(‘gallery’);
    remove_image_size(‘entry_with_sidebar’);
    remove_image_size(‘entry_without_sidebar’);
    remove_image_size(‘square’);
    }
    add_action( ‘after_setup_theme’, ‘ava_image_sizes’, 11 );

    and then u need to find which images sizes you are using, so you can simple remove the lines that are active and u are using.

    Best regards,
    Basilis

    #1050193

    Thank you, Basilis!

    Questions:

    1. Will this process get rid of the photos used for Woo Commerce? I won’t use Woo Commerce.
    2. For this line do I change the 11 to the number of photo sizes I end up with? add_action( ‘after_setup_theme’, ‘ava_image_sizes’, 11 );
    3. After this, do I use Regenerate Thumbnails plugin to re-process all the photos in my media library and delete the ones not used, or do I use a different plugin?

    Thanks!!!!
    Rob

    #1050204

    According to the Regenerate Thumbnails Plugin, here are the sizes currently configured in Enfold:

    “Thumbnail Sizes
    These are all of the thumbnail sizes that are currently registered:

    thumbnail: 600×650 pixels (proportionally resized to fit inside dimensions)
    medium: 300×300 pixels (proportionally resized to fit inside dimensions)
    medium_large: 768×0 pixels (proportionally resized to fit inside dimensions)
    large: 1030×1030 pixels (proportionally resized to fit inside dimensions)
    widget: 36×36 pixels (cropped to fit)
    square: 180×180 pixels (cropped to fit)
    featured: 1500×430 pixels (cropped to fit)
    featured_large: 1500×630 pixels (cropped to fit)
    extra_large: 1500×1500 pixels (proportionally resized to fit inside dimensions)
    portfolio: 495×400 pixels (cropped to fit)
    portfolio_small: 260×185 pixels (cropped to fit)
    gallery: 845×684 pixels (cropped to fit)
    magazine: 710×375 pixels (cropped to fit)
    masonry: 705×705 pixels (proportionally resized to fit inside dimensions)
    entry_with_sidebar: 845×321 pixels (cropped to fit)
    entry_without_sidebar: 1210×423 pixels (cropped to fit)
    shop_thumbnail: 120×120 pixels (cropped to fit)
    shop_catalog: 450×450 pixels (cropped to fit)
    shop_single: 450×999 pixels (proportionally resized to fit inside dimensions)”

    Hope that helps clarify.

    #1050873

    Hi,

    1.) You have to include the last 3 thumbnails (shop_thumbnail, shop_catalog & shop_single) from that list.

    remove_image_size(‘shop_thumbnail’);
    remove_image_size(‘shop_catalog’);
    remove_image_size(‘shop_single’);
    

    2.) That is the action priority. You don’t have to change that.

    3.) Yes, you need to regenerate the images to remove the unwanted thumbnails.

    Best regards,
    Ismael

    #1051136

    OK I added the below code to functions.php on my child theme and nothing changed… I uploaded a photo and all the sizes were generated when I SFTP in and look at the directory:

    function ava_image_sizes() {
    remove_image_size(‘magazine’);
    remove_image_size(‘widget’);
    remove_image_size(‘portfolio_small’);
    remove_image_size(‘gallery’);
    remove_image_size(‘entry_with_sidebar’);
    remove_image_size(‘entry_without_sidebar’);
    remove_image_size(‘shop_thumbnail’);
    remove_image_size(‘shop_catalog’);
    remove_image_size(‘shop_single’);
    }
    add_action( ‘after_setup_theme’, ‘ava_image_sizes’, 11 );

    What did I do wrong?

    Thanks,
    Rob

    #1051817

    Hi,

    Thanks for the update. This filter works on my end.

    add_filter('avf_modify_thumb_size', 'avf_modify_thumb_size_mod', 10, 1);
    function avf_modify_thumb_size_mod($size) {
        $size = array();
        return $size;
    }

    Best regards,
    Ismael

    #1051980

    I am unclear what to do here. Am I supposed to add that to the script you already gave me? Does this replace the code you already gave me? I am not a coder so need more explanation please.

    Thanks
    Rob

    #1052056

    Use the plugin https://de.wordpress.org/plugins/simple-image-sizes/ and set in the plugin’s settings (Settings -> Media) each image format, that you do not use or want, the size to height 0 and width 0; that means, that this image format will not be created for future uploads. Works only for new uploads, not for existing images.

    For example at my end I don’t need the shop image formats and set them to 0 / 0 – this image sizes aren’t created:
    http://imgbox.com/JbnLnm3a

    Simple and effective.

    The benefit of this plugin is, that you can also change existing image sizes to your desire.

    #1052268

    Hi!


    @goldengate415
    : You have to remove the first filter and use that one instead. Regenerate the thumbnails afterwards. If you’re using the following plugin, you’ll notice that after adding that code the theme’s thumbnail are going to be removed from the list of thumbnails in the plugin’s panel.

    // https://wordpress.org/plugins/regenerate-thumbnails/

    @Gitte: Thank you for the info. He doesn’t want to use a plugin, so we’re suggesting the filter.

    Cheers!
    Ismael

    #1052441

    Ismael, thanks so much. However I want to keep some of Enfold’s sizes.
    It sounds like this will eliminate all the theme’s sizes?

    I would like keep all except:
    – portfolio
    – portfolio small
    – gallery
    – entry with sidebar
    – entry without sidebar
    -shop thumbnail
    -shop catalog
    – shop single

    Do I need to customize the above code?

    Thanks for continuing to work with me on this…. !

    Cheers
    Rob

    #1053453

    Hi,

    Replace the filter with the following code to remove specific thumbnails:

    add_filter('avf_modify_thumb_size', 'avf_modify_thumb_size_mod', 10, 1);
    function avf_modify_thumb_size_mod($size) {
        unset($size['magazine']);
        unset($size['widget']);
        unset($size['portfolio_small']);
        unset($size['gallery']);
        unset($size['entry_with_sidebar']);
        unset($size['entry_without_sidebar']);
        unset($size['shop_thumbnail']);
        unset($size['shop_catalog']);
        unset($size['shop_single']);
        return $size;
    }

    Best regards,
    Ismael

    #1054813

    This code seems to keep all the thumbnails except the shop thumbnails when I upload… so after I installed the code in functions.php in my child theme, I uploaded a photo, and there are still 12 files (versus the original 15 at the top of this thread).

    I would imagine others will have this request if and when they start running up against their own 10 GB server storage limits. Can we figure this out please?

    Thanks,
    Rob

    #1054978

    https://kriesi.at/support/topic/photos-taking-up-a-huge-amount-of-space-on-my-site-storage-anything-i-can-do/#post-1052056

    #1055162

    Thanks Gitte, and then to re-generate the older media files already uploaded, do you use regenerate thumbnails plugin?
    I’m a bit concerned that the plugin you are recommending has not been updated in a long time and has not be certified to be compatible with WP 5.0…?

    #1055362

    OK… I gave up on using the functions.php and installed the plugins…. and I’ve reduced the storage used on my site by 50% from 9 GB to 4.5 GB with zero impact on the site itself. I DO THINK that Enfold should add this to the theme options… it’s ridiculous to save 15 files for every photo if you only need a few of them… wastes lots of space.

    For anyone else searching for this or needing to do this in the future, download:
    – Regenerate Thumbnails plugin
    – Simple Image Sizes Plugin

    Use Simple Image Sizes (SIS) to select which photo sizes you want to use on your site (See Gitte’s screenshots above for how to do it), then use Regenerate Thumbnails and select ” Delete thumbnail files for old unregistered sizes in order to free up server space. This may result in broken images in your posts and pages”

    BE SURE TO MAKE A BACKUP OF YOUR ENTIRE SITE BEFORE YOU BEGIN THIS PROCESS

    Thanks all for your help!! I am surprised this isn’t a more common request on this forum.
    Rob

    • This reply was modified 5 years, 10 months ago by goldengate415.
    #1055416

    @goldengate415

    when you use the “Simple Image Sizes Plugin” you do not need to install the “Regenerate Thumbnails plugin”, too, because the Simple Image Size plugin has the regenerate thumbnail functionality. See at the very bottom of the page, where you change your media sizes.

    #1055520

    Hi Gitte, I saw that button and used it on Simple Image Sizes Plugin to re-generate thumbnails, but after it ran I checked via SFTP and all the old ones were still there. It was not until I used the “Regenerate Thumbnails” plugin that the old ones were deleted. Perhaps this is unique to my server environment on WP Engine but I’m just glad to have the disk space cleaned up.

    Thanks for your help!

    #1055786

    Hi Rob,

    Thanks for sharing your experiences, much appreciated :-)

    Best regards,
    Rikard

    #1055791

    Sure thing, Rikard, hope it helps someone else. And maybe Gunter can work on this option for a future version of Enfold? :)

Viewing 22 posts - 1 through 22 (of 22 total)
  • You must be logged in to reply to this topic.