Skip to content

Commit

Permalink
Updated image guide (#5823)
Browse files Browse the repository at this point in the history
Added another option how markdown_captions extension can be used to show image alt text as caption.
  • Loading branch information
pana-exfo committed Aug 21, 2023
1 parent 92be65e commit ac30daa
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/reference/images.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,21 @@ but it's always possible to use the [Markdown in HTML] extension with literal
</figure>
</div>


Another option is to use [Markdown captions](https://github.com/Evidlo/markdown_captions) extension
which converts images with alt text to \<figure\> with \<figcaption\>.

``` html title="Image with caption"
![Image caption](https://dummyimage.com/600x400/){ width="300" }
```

<div class="result">
<figure>
<img src="https://dummyimage.com/600x400/f5f5f5/aaaaaa?text=–%20Image%20–" width="300" />
<figcaption>Image caption</figcaption>
</figure>
</div>

### Image lazy-loading

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

0 comments on commit ac30daa

Please sign in to comment.