Last active
March 21, 2024 01:27
-
-
Save johanguse/1f48b18b4da5bbd2aa6df41ab884010e to your computer and use it in GitHub Desktop.
List all image sizes from WordPress including custom sizes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$image_sizes = wp_get_additional_image_sizes(); | |
foreach ( $image_sizes as $key => $image_size ) { | |
echo "{$key} ({$image_size['width']} x {$image_size['height']})"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment