Skip to content

Commit ac30daa

Browse files
authored
Updated image guide (#5823)
Added another option how markdown_captions extension can be used to show image alt text as caption.
1 parent 92be65e commit ac30daa

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/reference/images.md

+15
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,21 @@ but it's always possible to use the [Markdown in HTML] extension with literal
136136
</figure>
137137
</div>
138138

139+
140+
Another option is to use [Markdown captions](https://github.com/Evidlo/markdown_captions) extension
141+
which converts images with alt text to \<figure\> with \<figcaption\>.
142+
143+
``` html title="Image with caption"
144+
![Image caption](https://dummyimage.com/600x400/){ width="300" }
145+
```
146+
147+
<div class="result">
148+
<figure>
149+
<img src="https://dummyimage.com/600x400/f5f5f5/aaaaaa?text=–%20Image%20–" width="300" />
150+
<figcaption>Image caption</figcaption>
151+
</figure>
152+
</div>
153+
139154
### Image lazy-loading
140155

141156
Modern browsers provide [native support for lazy-loading images][lazy-loading]

0 commit comments

Comments
 (0)