Skip to content

Commit e0f0380

Browse files
authored
Update images.md (#1090)
1 parent 349c719 commit e0f0380

File tree

1 file changed

+23
-17
lines changed

1 file changed

+23
-17
lines changed

docs/syntax/images.md

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,35 @@
11
# Images
22

3-
Images include screenshots, inline images, icons, and more. Syntax for images is like the syntax for links, with two differences:
3+
Images include screenshots, inline images, icons, and more. Syntax for images is like the syntax for links, with the following differences:
4+
45
1. instead of link text, you provide an image description
56
2. an image description starts with `![` not just `[`
7+
3. there are restrictions on the scope of image paths
8+
9+
:::{note}
610

7-
Images can be referenced from the top-level `_static` dir or a local image dir.
11+
If a page uses an image that exists outside the folder that contains the `toc.yml` file or `docset.yml` file that contains that page, the image will fail to render and will generate warnings. Likewise, if a snippet in a [file inclusion](/syntax/file_inclusion.md) includes an image and is used in pages that exist in different `toc.yml`, the images will break.
12+
:::
813

914
## Block-level images
1015

1116
```markdown
12-
![APM](images/apm.png)
17+
![APM](/syntax/images/apm.png)
1318
```
1419

15-
![APM](images/apm.png)
20+
![APM](/syntax/images/apm.png)
21+
1622

1723
Or, use the `image` directive.
1824

1925
```markdown
20-
:::{image} images/observability.png
26+
:::{image} /syntax/images/observability.png
2127
:alt: Elasticsearch
2228
:width: 250px
2329
:::
2430
```
2531

26-
:::{image} images/observability.png
32+
:::{image} /syntax/images/observability.png
2733
:alt: Elasticsearch
2834
:width: 250px
2935
:::
@@ -33,36 +39,37 @@ Or, use the `image` directive.
3339
Screenshots are images displayed with a box-shadow. Define a screenshot by adding the `:screenshot:` attribute to a block-level image directive.
3440

3541
```markdown
36-
:::{image} images/apm.png
42+
43+
:::{image} /syntax/images/apm.png
3744
:screenshot:
3845
:::
3946
```
4047

41-
:::{image} images/apm.png
48+
:::{image} /syntax/images/apm.png
4249
:screenshot:
4350
:::
4451

4552
## Inline images
4653

4754
```markdown
48-
Here is the same image used inline ![Elasticsearch](images/observability.png "elasticsearch =50%x50%")
55+
Here is the same image used inline ![Elasticsearch](/syntax/images/observability.png "elasticsearch =50%x50%")
4956
```
5057

51-
Here is the same image used inline ![Elasticsearch](images/observability.png "elasticsearch =50%x50%")
58+
Here is the same image used inline ![Elasticsearch](/syntax/images/observability.png "elasticsearch =50%x50%")
5259

5360

5461
### Inline image titles
5562

5663
Titles are optional making this the minimal syntax required
5764

5865
```markdown
59-
![Elasticsearch](images/observability.png)
66+
![Elasticsearch](/syntax/images/observability.png)
6067
```
6168

6269
Including a title can be done by supplying it as an optional argument.
6370

6471
```markdown
65-
![Elasticsearch](images/observability.png "elasticsearch")
72+
![Elasticsearch](/syntax/images/observability.png "elasticsearch")
6673
```
6774

6875
### Inline image sizing
@@ -92,17 +99,16 @@ If `H` is omitted `W` is used as the height as well.
9299
### SVG
93100

94101
```markdown
95-
![Elasticsearch](images/alerts.svg)
102+
![Elasticsearch](/syntax/images/alerts.svg)
96103
```
97-
![Elasticsearch](images/alerts.svg)
104+
![Elasticsearch](/syntax/images/alerts.svg)
98105

99106
### GIF
100107

101108
```markdown
102-
![Elasticsearch](images/timeslider.gif)
109+
![Elasticsearch](/syntax/images/timeslider.gif)
103110
```
104-
![Elasticsearch](images/timeslider.gif)
105-
111+
![Elasticsearch](/syntax/images/timeslider.gif)
106112

107113
## Asciidoc syntax
108114

0 commit comments

Comments
 (0)