Skip to content

Commit d00201e

Browse files
committed
Updated Images style guide article
1 parent bf2402e commit d00201e

File tree

3 files changed

+70
-26
lines changed

3 files changed

+70
-26
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
description: >-
3+
Learn how to add images and its folder structure.
4+
---
5+
6+
# Images
7+
8+
Images should be stored in an `images` or `assets` directory next to the `.md` file referencing them, using relative paths. Use descriptive alt text and captions to ensure accessibility and Search Engine Optimization (SEO) benefits. Optimize images for the web to improve page load times.
9+
10+
## General Guidelines
11+
12+
* Maximum image width: **800px**.
13+
14+
* Supported formats: `png`, `jpg`, `gif` (use the most efficient compression available).
15+
16+
* Prohibited formats: `bmp`, `tiff`, `swf` (Flash)
17+
18+
## Folder Structure
19+
20+
If images are used, these must be stored in an `images` or `assets` directory next to the `.md` file referencing them using relative paths.
21+
22+
Maintain a clear and consistent directory structure:
23+
24+
```plaintext
25+
/topic # Main documentation directory
26+
│── README.md # Main content file
27+
│── another-page.md # Another markdown file
28+
│── /images # Image storage
29+
│ ├── image1.png
30+
│ ├── image2.jpg
31+
32+
└── /subtopic # Subdirectory for related content
33+
│── README.md
34+
│── topic.md
35+
│── another-topic.md
36+
│── /images # Subdirectory for subtopic images
37+
├── image3.png
38+
```
39+
40+
## Adding images in Markdown
41+
42+
Use the following markdown syntax to insert images:
43+
44+
* Image with Caption
45+
46+
```markdown
47+
![Caption](../images/sample.png)
48+
```
49+
50+
* Image with Alt Text (Markdown/GitHub):
51+
52+
```markdown
53+
![Alt text describing the image](images/img.png)
54+
```
55+
56+
* Image with Alt Text (GitBook)
57+
58+
```html
59+
<figure><img src="../images/sample.png" alt="The New Backoffice"></figure>
60+
```
61+
62+
{% hint style="info" %}
63+
Always provide alt text or a caption to describe the image’s purpose and content.
64+
{% endhint %}
65+
66+
## Best Practices
67+
68+
* Use clear and relevant filenames. For example: dashboard-view.png instead of image1.png.
69+
* Avoid excessive text in images. If text is necessary, provide a description above or below the image in the documentation.
70+
* Use SVG format for diagrams and icons where possible to ensure scalability.

contributing/documentation/style-guide/markdown-conventions.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,6 @@ The Umbraco Documentation uses Markdown for all articles.
88

99
In this article you can learn how we Markdown for different elements on our documentation.
1010

11-
## Images
12-
13-
Images are linked using relative paths to `.md` pages.
14-
15-
The following sample adds an image, `img.png`, located in an `images` folder:
16-
17-
```markdown
18-
![My Image Alt Text](images/img.png)
19-
```
20-
21-
{% hint style="info" %}
22-
Make sure to add a descriptive image text that presents the user with the same information as the image provides.
23-
{% endhint %}
24-
2511
## Links
2612

2713
In the following you will find a few examples of different links.

contributing/documentation/style-guide/structure.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,3 @@ Each directory must have a `README.md` file which will act as a landing page for
2828
All file and directory names need to be small-caps in order to be synced properly with GitBook.
2929

3030
If an article is not a landing page, we recommend using the title of the article as the file name.
31-
32-
## Images
33-
34-
Images are stored and linked using relative paths to .md pages, and should by convention always be in an `images` directory. To add an image to `/documentation/reference/partials/renderviewpage.md` you link it like so:
35-
36-
```markdown
37-
![My Image Alt Text](images/img.png)
38-
```
39-
40-
And store the image as `/documentation/reference/partials/images/img.png`
41-
42-
Images can have a maximum width of **800px**. Please always try to use the most efficient compression, `gif` or `png`. No `bmp`, `tiff` or `swf` (Flash).

0 commit comments

Comments
 (0)