I need to add a wrapper (I'll use <figure>
in my example) around images posted through the editor, with a variable depending on the size image is being posted (thumbnail, medium, large, full), something like:
<figure class="$size">
<a rel="attachment" href="....>
<img... />
</a>
</figure>
I already solved the first step, adding the wrapper with a filter through image_send_to_editor
, but I can't find a way to get the image size so I can add it to the class.
Any clue?