When I insert an image into a post in WordPress, the markup similar to this is inserted into the editor:
<a href="http://example.com/w-content/uploads/2014/01/image.jpg" rel="attachment wp-att-26">
<img src="http://example.com/w-content/uploads/2014/01/image-100x100.jpg"
width="100" height="100" class="alignleft wp-image-26" />
</a>
How can I change that markup? I would like to use a <figure>
tag for images, for example.
I’ve found out how to do this. The markup can be influenced using the filter
image_send_to_editor
.