This can be helpful when developing or adding onto a pre-built site that may have various ways an image size could have been set. I found on some sites that I was updating there were hidden image sizes that work well for various design aspects – and in keeping the loading time down on a page.

This code can be added to a development theme to see all possible image sizes on the front end:

global $_wp_additional_image_sizes; 
print '<pre>'; 
print_r( $_wp_additional_image_sizes ); 
print '</pre>';

Just add the above into your theme and refresh that page and you’ll get an array of all possible image sizes.

Leave a Comment

Your email address will not be published. Required fields are marked *