You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be fantastic if there was the option to wrap the standard <picture> element from the eleventyImageTransformPlugin in a <figure> tags and allow developers to post image captions using <figcaption>.
Proposed code: Input ![This is the alt text](path/to/the/image.jpg "This is the **caption**")
Output
<figure><picture><sourcetype="image/avif" srcset="/.11ty/image/?src=..."><sourcetype="image/webp" srcset="/.11ty/image/?src=..."><imgloading="lazy" decoding="async" src="/.11ty/image/?src=..." alt="alt text here" width="123" height="321"></picture><figcaption>This is the <strong>caption</strong></figcaption></figure>
Just for completeness, I should mention that if you’re using markdown now, you can use this input now and the transform plugin will output what you want there above:
<figure>
<img src="path/to/the/image.jpg" alt="This is the alt text">
<figcaption>This is the <strong>title</strong></figcaption>
</figure>
It would be fantastic if there was the option to wrap the standard
<picture>
element from theeleventyImageTransformPlugin
in a<figure>
tags and allow developers to post image captions using<figcaption>
.Proposed code:
Input
![This is the alt text](path/to/the/image.jpg "This is the **caption**")
Output
Looping in @nhoizey as I adapted his gist example here that he uses with his eleventy-plugin-images-responsiver plugin here.
Update: Also, I should have noted that the
<figure>
element would only be present if a caption was given in the markdown snippet.The text was updated successfully, but these errors were encountered: