New Landing How can we help? Themeforest Theme Support Dante Remove the aditional THUMBNAIL SIZES

Viewing 4 posts - 1 through 4 (of 4 total)
  • Posted in: Dante
  • #179333
    iquarius
    Member
    Post count: 32

    Hello,

    In the functions.php file, there are some images sizes that my site does not require, so to save some storage space, how can I ‘remove’ some of these add_image_size() without breaking Dante (maybe some way to override it from my child theme).

    functions.php – Line 83

    /* THUMBNAIL SIZES
    ================================================== */
    set_post_thumbnail_size( 220, 150, true);
    add_image_size( ‘widget-image’, 94, 70, true);
    add_image_size( ‘thumb-square’, 250, 250, true);
    add_image_size( ‘thumb-image’, 600, 450, true);
    add_image_size( ‘thumb-image-twocol’, 900, 675, true);
    add_image_size( ‘thumb-image-onecol’, 1800, 1200, true);
    add_image_size( ‘blog-image’, 1280, 9999);
    add_image_size( ‘full-width-image-gallery’, 1280, 720, true);

    Please advise,

    #179402
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please paste this code at functions.php of child theme.

    add_action('init', 'sf_remove_plugin_image_sizes');
    
    function sf_remove_plugin_image_sizes() {
    remove_image_size( 'widget-image');
    remove_image_size( 'thumb-square');
    remove_image_size( 'thumb-image');
    remove_image_size( 'thumb-image-twocol');
    remove_image_size( 'thumb-image-onecol');
    remove_image_size( 'blog-image');
    remove_image_size( 'full-width-image-gallery');
    	
    }

    Thanks
    Mohammad

    #179726
    iquarius
    Member
    Post count: 32

    Thank you Mohammad!

    It worked fine 🙂

    #179728
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    No problem. Thanks Mohammad.
    -Rui

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register