Gutenberg WordPress wraps images in <figure> by default. My concern was that most people probably just want the image and not the extra markup noise that comes with <figure>.
So I preserve <figure> only when there is a <figcaption> within.
That way folks purposefully using <figure> + <figcaption> will have their markup preserved. Others will get the simple image markdown.
If there is demand for more nuance/control, then adding a flag to settings.js can be considered.
Gutenberg WordPress wraps images in
<figure>
by default. My concern was that most people probably just want the image and not the extra markup noise that comes with<figure>
.So I preserve
<figure>
only when there is a<figcaption>
within.That way folks purposefully using
<figure>
+<figcaption>
will have their markup preserved. Others will get the simple image markdown.If there is demand for more nuance/control, then adding a flag to
settings.js
can be considered.