Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

What function can I use in a plugin to get the dimensions of every image size (in an array preferably) that is defined in a child theme?

Just for clarification I am not asking how to create a new image size.

share|improve this question
    
Searching for something like this, but with an interface, came across the plugin Additional image sizes (zui). It has 500 days without updates but passed the first batch of tests. –  brasofilo Jul 6 '12 at 1:51

2 Answers 2

up vote 5 down vote accepted

Found it here. The answer is:

global $_wp_additional_image_sizes; 
print '<pre>'; 
print_r( $_wp_additional_image_sizes ); 
print '</pre>';
share|improve this answer

If you only need the names of all image sizes, you can use get_intermediate_image_sizes:

<pre>
<?php print_r(get_intermediate_image_sizes()); ?>
</pre>
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.