WordPress.org

Forums

The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

How do I retrieve a list of all intermediate image sizes... (2 posts)

  1. waltervos
    Member
    Posted 6 years ago #

    ... including the ones that have been set by the theme? Is there a function to do this?

  2. Mark / t31os

    Posted 6 years ago #

    You can use get_intermediate_image_sizes since 3.0

    // Storing in var
    $_img_sizes = get_intermediate_image_sizes();
    
    // Print data for testing purposes
    print '';
    print_r( $_img_sizes );
    print '';

    Should give you all the appropriate sizes..

    Function can be found in wp-includes/media.php.

Topic Closed

This topic has been closed to new replies.

About this Topic