mirror of
https://github.com/mintlify/docs.git
synced 2026-09-14 13:35:46 +08:00
b746defeed
* Update supported file types and keywords * Apply suggestion from @ethanpalm
63 lines
2.0 KiB
Plaintext
63 lines
2.0 KiB
Plaintext
---
|
|
title: "Add media"
|
|
description: "Upload and use images and assets in your documentation."
|
|
keywords: ["editor","media","images","assets"]
|
|
---
|
|
|
|
## Supported file types
|
|
|
|
- **Images**: PNG, JPG, JPEG, SVG, GIF, WebP (max 15MB)
|
|
- **Videos**: MP4, WebM (max 100MB)
|
|
- **Fonts**: TTF, WOFF, WOFF2
|
|
- **Other**: PDF, ICO (favicons)
|
|
|
|
## Add media to a page
|
|
|
|
### Drag and drop
|
|
|
|
Drag and drop media from your computer or the asset manager onto a page in visual mode. Images save to the root of your `images/` folder, and videos save to the root of your `videos/` folder.
|
|
|
|
### Slash command
|
|
|
|
Type <kbd>/image</kbd> to open the image menu or <kbd>/video</kbd> to open the video menu. Upload new media or select from existing files.
|
|
|
|
### Upload files
|
|
|
|
Use the asset manager in the sidebar to upload or search for files.
|
|
|
|
<Frame>
|
|
<img
|
|
src="/images/editor/assets-light.png"
|
|
alt="Assets manager selected in the editor sidebar menu."
|
|
className="block dark:hidden"
|
|
/>
|
|
|
|
<img
|
|
src="/images/editor/assets-dark.png"
|
|
alt="Assets manager selected in the editor sidebar menu."
|
|
className="hidden dark:block"
|
|
/>
|
|
</Frame>
|
|
|
|
Click **Upload** in the asset manager to add files from your computer.
|
|
|
|
## Manage assets
|
|
|
|
### Organize with folders
|
|
|
|
Click the **+** button in the file explorer to create a new folder. Drag and drop files and folders in the file tree to reorganize them.
|
|
|
|
### Rename and edit assets
|
|
|
|
Hover over an asset and click the **...** button to rename the file or update its alt text.
|
|
|
|
### Delete assets
|
|
|
|
Hover over an asset and click the <Icon icon="trash" /> delete button.
|
|
|
|
## Best practices
|
|
|
|
- **Use descriptive names**: Name files clearly, like `api-dashboard-light.png` instead of `img1.png`.
|
|
- **Add alt text**: Provide descriptive alt text for accessibility and SEO.
|
|
- **Organize with folders**: Group related assets, such as light and dark mode variants or assets for a specific feature area.
|
|
- **Use appropriate formats**: PNG for graphics with transparency, JPG for photos, SVG for icons and logos. |