Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 24 additions & 8 deletions en/syntax/media.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,33 @@ The standard markup for inserting an image is:
![alt-text](_images/image.png "hint_text" =100x100)
```

* `alt-text`: Alternative image text.
* `_images/image.png`: The URL or path to the image file.
* `"hint_text"`: A hint that will be displayed when you hover over the image. Optional.
* `=100x100`: The image size. Optional.
* `alt-text`: Alternative image text.
* `_images/image.png`: The URL or path to the image file.
* `"hint_text"`: A hint that will be displayed when you hover over the image. Optional.
* `=100x100`: The image size. Optional.

{% note tip %}
{% note tip %}

If you want to keep the aspect ratio of your image, only specify its width: `100x`.
If you want to keep the aspect ratio of your image, only specify its width: `100x`.

{% endnote %}

### Images with captions

You can enable the display of the caption you need to add the { caption } as attribute, the default value is equal to the title, but it can also be passed in the attribute.

```markdown
![Alt text](../../_images/mountain.jpg "Default caption text" =100x100){ caption }

![Alt text](../../_images/mountain.jpg "Title" =100x100){ caption="Specified caption text" }
```

**Result**

![Alt text](../../_images/mountain.jpg "Default caption text" =100x100){ caption }

![Alt text](../../_images/mountain.jpg "Title" =100x100){ caption="Specified caption text" }

{% endnote %}

### Images as links {#image-link}

Expand Down Expand Up @@ -61,4 +78,3 @@ To add videos to a page, use markup:
```

To review the style options and list of available video hosting services, see the [markdown-it-video](https://www.npmjs.com/package/markdown-it-video) plugin page.

Loading