Place image caption outside of figure tag (Gutenburg Image Markup)
I format my single.php images to a perceived 3:2 ratio like this:
figure style=position:relative; width:100%; padding-bottom:66%;
img style=position:absolute; width:100%; height:100%; object-fit:cover;
figcaptionsome text/figcaption
/figure
With Gutenberg, this sticks my caption behind my image or on top of my image (if I position figcaption relative or absolute). I'd like it to be below my image. Before gutenberg, I could customize my image markup. No longer can. Now I am trying to figure out how to make my image caption the next sibling of the figure tag and not a child of it.
Something like
figure
img
/figure
figcaptionsome text/figcaption
I know this breaks the figcaption rules. Right now I am worried about styling.
Any recommendations are appreciated. Thanks!
Topic block-editor captions images Wordpress
Category Web