WordPress.org

Support

Support » Plugins and Hacks » Hacks » How do I retrieve a list of all intermediate image sizes…

How do I retrieve a list of all intermediate image sizes…

  • waltervos
    Member

    @waltervos

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

Viewing 1 replies (of 1 total)
  • Mark / t31os
    Member

    @t31os_

    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.

Viewing 1 replies (of 1 total)
  • The topic ‘How do I retrieve a list of all intermediate image sizes…’ is closed to new replies.