Adding Files and Media
Learn how to add images, PDFs, and other files to your documentation.
Directory Structure for Assets
Create an assets folder in the docs/ directory:
docs/
├── assets/
│ ├── images/
│ │ └── screenshot.png
│ ├── downloads/
│ │ └── document.pdf
│ └── files/
│ └── example.zip
├── index.md
└── guides/
└── adding-files.md
Embedding Images
Inline Image

Image with Link
[](https://example.com)
Centered Image (HTML)
<div style="text-align: center;">
<img src="../assets/images/screenshot.png" alt="Description" width="600">
</div>
Adding Download Links
PDF Download
[Download PDF](../assets/downloads/document.pdf)
ZIP File Download
[Download Files](../assets/files/example.zip)
Button-style Download Link
<a href="../assets/downloads/document.pdf" class="md-button md-button--primary">
Download PDF
</a>
File Organization Best Practices
- Keep assets organized - Use subdirectories by type (images, downloads, files)
- Use descriptive names -
user-guide.pdfinstead ofdoc1.pdf - Optimize images - Compress before uploading to keep repo size small
- Relative paths - Use
../to reference parent directories
Supported File Types
Images
- PNG (recommended for diagrams)
- JPG (good for photos)
- SVG (scalable vector graphics)
- GIF (animated)
- WebP (modern format)
Documents
- Markdown files
- Text files
Archives
- ZIP
- TAR.GZ
- 7Z
Adding Files via GitHub
- Go to your repo on GitHub
- Navigate to the folder where you want to add files
- Click Add file → Upload files
- Drag and drop your files or click to select
- Add a commit message
- Commit to main branch
- Run the Deploy MkDocs action to rebuild your site
Example: Adding an Image
- Create folder:
docs/assets/images/ - Upload your image via GitHub
- In your markdown file, add:
 - That's it!
Tips
- Keep image filenames lowercase with hyphens:
my-screenshot.png - Use Alt text for accessibility
- For large files, consider using external storage and linking to it