Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #592772

    The enfold template is creating multiple versions/sizes of every image I add to the website. One image has 33 different versions,and accounts for 10MB of data. I have a ton of images and it’s taking up a lot of server space. My site is shutting down due to lack of server space.

    Question 1:
    Is there a way to control image duplication via the functions.php file?

    Question 2:
    Is there a way to set preferences on image management/duplication in the template?

    Question 3:
    If I delete some of the duplicate images… will the original image display in different views by default – or will the deleted images show as broken links?

    #594375

    Hey cpalichleb52!

    Please add following code to Functions.php file in Appearance > Editor

    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 );

    Best regards,
    Yigit

    #599755

    Yigit,
    When the theme is updated, will the modification be erased?

    #599775

    Hey!

    Yes, but you can use a child theme to avoid that – http://kriesi.at/documentation/enfold/using-a-child-theme/

    Best regards,
    Yigit

    #599965

    If I add your code to the functions.php file, will there be instances where images will not display (like on mobile devices)?

    Will there be instances of broken links or will the original image display in all instances?

    Last question… Will the code remove existing duplicates or just new images added to the media library?

    Thanks!

    #600957

    Hi!

    Will there be instances of broken links or will the original image display in all instances?

    Yes, that will be the case specially for image element with a specific thumbnail selected. Make sure to select the original size.

    Last question… Will the code remove existing duplicates or just new images added to the media library?

    It will only prevent new thumbnails from being generated. If you want to remove existing thumbnails, use the following plugin: https://wordpress.org/plugins/force-regenerate-thumbnails/

    Regards,
    Ismael

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