| title | Images and embeds |
|---|---|
| description | Add images, videos, and iframes |
| icon | image |
Add images, embed videos, and include interactive content with iframes to your documentation.
All static assets in your docs repository are automatically served at the appropriate path on your domain. For example, if you have /images/my-logo.png in your repo, the image will be available at https://docs.yoursite.com/images/my-logo.png.
Add images to provide visual context, examples, or decoration to your documentation.
Use Markdown syntax to add images to your documentation:
Image files must be less than 20MB. For larger files, host them on a CDN service like Amazon S3 or Cloudinary.
For more control over image display, use HTML <img> tags:
<img
src="/images/dashboard.png"
alt="Main dashboard interface"
height="300"
className="rounded-lg"
/>To disable the default zoom on click for images, add the noZoom property:
<img
src="/images/screenshot.png"
alt="Descriptive alt text"
noZoom
height="200"
/>To make an image a clickable link, wrap the image in an anchor tag and add the noZoom property:
<a href="https://mintlify.com" target="_blank">
<img
src="/images/logo.png"
alt="Mintlify logo"
noZoom
height="100"
/>
</a>To display different images for light and dark themes, use Tailwind CSS classes:
<!-- Light mode image -->
<img
className="block dark:hidden"
src="/images/light-mode.png"
alt="Light mode interface"
/>
<!-- Dark mode image -->
<img
className="hidden dark:block"
src="/images/dark-mode.png"
alt="Dark mode interface"
/>Mintlify supports HTML tags in Markdown, giving you flexibility to create rich content.
Always include fallback text content within video elements for browsers that don't support video playback.Embed YouTube videos using iframe elements:
<iframe
className="w-full aspect-video rounded-xl"
src="https://www.youtube.com/embed/4KzFe50RQkQ"
title="YouTube video player"
frameBorder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowFullScreen
></iframe>Use the HTML <video> element for self-hosted video content:
<video
controls
className="w-full aspect-video rounded-xl"
src="link-to-your-video.com"
></video>To autoplay a video, use:
<video
autoPlay
muted
loop
playsInline
className="w-full aspect-video rounded-xl"
src="/videos/demo.mp4"
></video>Embed external content using iframe elements:
<iframe
src="https://example.com/embed"
title="Embedded content"
className="w-full h-96 rounded-xl"
></iframe>