What hook to alter html in Edit Image process ?
-
I use the image_send_to_editor hook (and post_thumbnail_html hook) in order to strip the image width and height from the html <img> tag, in the Add Media process, so that my theme will be responsive. (I replace width with a percentage). That works fine.
However I cannot find an equivalent hook for the Edit Image process. As far as I can tell the above hooks are not called in that process. Please correct me if I’m wrong.
The effect is that if the user goes back and edits the image, then the width and height are added back into the html <img> tag, and the image becomes unresponsive.
I see an action hook (edit_attachment) but that doesn’t present the html <img> tag, as far as I understand.
What filter hook can I use to alter the html <img> tag in the Edit Image process ?
Thank you.
- The topic ‘What hook to alter html in Edit Image process ?’ is closed to new replies.