|
| 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 | + |
| 48 | +``` |
| 49 | + |
| 50 | +* Image with Alt Text (Markdown/GitHub): |
| 51 | + |
| 52 | +```markdown |
| 53 | + |
| 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. |
0 commit comments