---
title: "Images and files"
description: "Add images, show a different one in light and dark mode, and serve files such as PDFs."
---

Put an image in your docs folder and show it with Markdown. Specly copies it to your site.

## Add an image

```mdx
![Specly's mark, in ink](/logo/light.svg)
```

![Specly's logo](/logo/light.svg)

Always write the text between the brackets. It's what a screen reader says, and what readers see if the image doesn't
load. The path starts at the docs folder, or at `public/`, so `/logo/light.svg` is the file `logo/light.svg`.

You can also use an HTML `<img>` tag, to set a size:

```mdx
<img src="/logo/light.svg" alt="Specly's logo" width="160" />
```

## Light and dark images

An image made for a light page can disappear on a dark one. Give each mode its own image, and readers see the one for
their mode. Specly reads Mintlify's pair of classes, `block dark:hidden` and `hidden dark:block`:

<img className="block dark:hidden" src="/logo/light.svg" alt="Specly's logo, for light mode" width="160" />
<img className="hidden dark:block" src="/logo/dark.svg" alt="Specly's logo, for dark mode" width="160" />

```mdx
<img className="block dark:hidden" src="/logo/light.svg" alt="Specly's logo, for light mode" />
<img className="hidden dark:block" src="/logo/dark.svg" alt="Specly's logo, for dark mode" />
```

Switch your site to dark mode to see the other image.

## Other files

Any image, font, PDF, audio or video file in your docs folder is served at its path. Link to a file the way you link to a
page:

```mdx
[Download the checklist](/files/checklist.pdf)
```

Specly serves these types: PNG, JPEG, GIF, SVG, WebP, AVIF, ICO, WOFF, WOFF2, TTF, OTF, PDF, MP4, WebM, MOV, MP3, WAV, TXT
and ZIP.

Pages, `docs.json` and code files are never served this way.

## `public/`

Files in a `public/` folder are served from the root of your site: `public/favicon.svg` is at `/favicon.svg`. A `public/CNAME` file holding your site's address sets its canonical links and sitemap. See [SEO](/customize/seo).

> **Note:** A file in a folder that looks internal, such as `plans/` or `notes/`, is left out unless a page links to it.
