images: clarify docs for image links #576

This commit is contained in:
Sören Weber 2023-08-26 00:00:41 +02:00
parent 9de73221c4
commit 80a7528179
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D

View file

@ -677,3 +677,14 @@ Add the query parameter `lightbox=false` to the image link to disable the lightb
{{% notice style="secondary" icon="eye" title="Result" %}}
![Homercat](https://octodex.github.com/images/homercat.png?width=20vw&lightbox=false)
{{% /notice %}}
{{% notice note %}}
If you want to wrap an image in a link and `lightbox=true` is your default setting, you have to explicitly disable the lightbox to avoid it to hijacking your link like:
````markdown
[![Homercat](https://octodex.github.com/images/homercat.png?lightbox=false)](https://octodex.github.com/#homercat)
````
[![Homercat](https://octodex.github.com/images/homercat.png?width=20vw&lightbox=false)](https://octodex.github.com/#homercat)
{{% /notice %}}