Is there a standard way to get all the registered sizes of the featured images?
One can register different sizes with add_image_size()
.
What I need, is to get all the sizes of a featured image of a post.
Something like this:
$sizes = get_post_feature_image_sizes($postid);
...which will return an array of objects like this (here in JSON format):
[
{width: 200, height: 300, url: 'http://.........../wp-content/uploads/2015/10/file-200x300.jpg'},
{width: 300, height: 400, url: 'http://.........../wp-content/uploads/2015/10/file.jpg'},
]
Is there anything like this, or I will have to scan all the upload folder file names with regex?