Nextra enhances both images and links beyond standard Markdown defaults. Images are automatically optimized through Next.js’s built-inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/shuding/nextra/llms.txt
Use this file to discover all available pages before exploring further.
<Image> component, giving you lazy loading and blur-up placeholders for free. Links to other pages in your site are silently upgraded to Next.js <Link> elements that prefetch the destination and navigate without a full page reload.
Images
Standard Markdown Syntax
The most common way to include images is the standard Markdown syntax:staticImage: true config option automatically wraps this with next/image, so you don’t need to specify width and height — they are inferred from the file at build time.
Static Assets in public/
Place images in your project’s public/ directory and reference them with an absolute path:
Next.js Image Optimization
WhenstaticImage is enabled (the default), every ![]() image in your MDX is rendered via next/image, which provides:
- Automatic resizing — the image is served at the exact dimensions needed.
- Modern formats — Next.js serves WebP or AVIF where the browser supports it.
- No layout shift — width/height are known at build time, so the page doesn’t jump.
- Blur placeholder — a low-quality blurry preview is shown while the image loads.
Image Zoom
By default, Nextra wraps images with a zoom handler so users can click to expand them. To disable zoom for a specific image, use the<Image> component from nextra/components instead of the Markdown syntax:
<ImageZoom>:
nextra-theme-docs or nextra-blog-theme, replace the default img component in your mdx-components.js file:
Links
Internal Links
Use standard Markdown link syntax to link between pages in your site:next/link element:
External Links
Links to external URLs (starting withhttp:// or https://) are rendered with target="_blank" and rel="noopener noreferrer" automatically, so they open in a new browser tab without leaking your page’s referrer.
Locale-Aware Links (i18n)
When building an internationalized site, Nextra uses an internalremark-link-rewrite plugin to prefix relative links with the current locale. The unstable_shouldAddLocaleToLinks option in your Nextra config controls whether locale prefixes are added to links in the page map:
unstable_shouldAddLocaleToLinks is useful when you don’t want to use
Nextra’s built-in middleware function for automatic locale detection and
redirect.