I have registered new image size wide-image
which should be wrapped inside custom div. I haven't found any wordpress function which gives me the power to check what size of the attached image is used. The size is only in img class like class="size-wide-image wp-image-2924"
.
What I want to achieve is something like this:
foreach ( attached_image ):
if ( wide-image ):
echo '<div class="wrap-wide-image">' . link + attached_image . '</div>';
endif;
endforeach;
I'm not looking for jQuery solution, I'm looking for php solution. Thank you.