• Resolved shramee

    (@shramee)


    Just went through a question which asked how to check if an image size exists, unfortunately there was no satisfying answer…

    Here’s how it can be done,

    in_array( 'large', get_intermediate_image_sizes() ); // boolean true
    
    in_array( 'medium_large', get_intermediate_image_sizes() ); // for WP version > 4.4 boolean true, else false
    
    in_array( 'humongous', get_intermediate_image_sizes() ); // boolean false (doesn't exist by default)

  • The topic ‘Check if an image size exists’ is closed to new replies.