Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #745778

    I have this in my child functions.php to stop Enfold creating some image sizes that the site never uses:

    /* 
     * Stop Enfold image sizes we don't use being created to save disk space
     */
    function ava_image_sizes() { 
    	remove_image_size('medium_large');	
    	remove_image_size('featured');
    	remove_image_size('featured_large');
    	remove_image_size('extra_large');
    	remove_image_size('gallery');
    	remove_image_size('magazine');
    	remove_image_size('masonry');
    	remove_image_size('shop_thumbnail');
    	remove_image_size('shop_catalog');
    	remove_image_size('shop_single');
    }
    add_action( 'after_setup_theme', 'ava_image_sizes', 10 );

    I also have the Simple Image Sizes plugin installed. None of the above image sizes are created when new media is uploaded, and the Image Sizes list in Media Settings does not list them, as it should be…

    …except the instruction to remove medium_large is ignored as can be seen here:

    http://imgur.com/a/W1pGA
    (Screenshot of Media Settings > Image Sizes)

    I have tried deleting medium_large via the Media Settings page (using the ‘Delete’ button in the screenshot) and the entry does disappear when deleted. However as soon as I ‘Save Changes’ at the bottom of the screen, medium_large reappears at the top of the ‘Image sizes’ list.

    I have tried setting the Max Height to a value other than 0, e.g. 500, then Updating, which is accepted, then Deleting, and again it disappears from the list – until I Save Changes when it re-appears again with the values of Width 768 and Height 0 (and note – not the 500 value that was previously set).

    There is clearly something in the code that is stopping medium_large from being removed/deleted.

    But I do not want the medium_large size to be created by Enfold. How do I remove/delete the image size to stop it being created on new uploads?

    • This topic was modified 7 years, 10 months ago by zimbo.
    #747595

    Hey zimbo,

    Sorry for the late reply!

    “medium_large” is not one of the image sizes created by Enfold. You can check Enfold parent themes functions.php file to find all image sizes created by the theme.

    Best regards,
    Yigit

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