# Next.js: Specified "headers" cannot be used with "output: export" / Image Optimization using the default loader is not compatible with `{ output: 'export' }`

**Code:** `Features not supported with output: export (headers, redirects, image loader)` · **Category:** Next.js · **Seen on:** Next.js

Static export (`output: 'export'`) can't use server features like rewrites/headers/redirects, default image optimisation, middleware or dynamic APIs.

## Meaning

Use `images: { unoptimized: true }` (or a custom loader), configure headers/redirects at the host (Netlify `_headers`, Nginx), remove middleware/route handlers that need a server, and avoid `cookies()`/`headers()`. Or deploy as a normal Node/Vercel app instead of export.

## Common causes

- next/image default loader with export
- `headers`/`redirects`/`rewrites` in next.config
- Middleware or API routes present
- Server Actions or dynamic APIs
- ISR/revalidate expectations

## Quick fix

1. `images: { unoptimized: true }`
2. Move headers/redirects to the hosting layer
3. Remove server-only features or drop `output: "export"`

## Detailed fix by platform

### Next.js

1. `module.exports = { output: "export", images: { unoptimized: true } };`

## How to diagnose

1. **Feature** — Which unsupported?
2. **Hosting** — Static only?
3. **Alternative** — Server deploy?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/nextjs/output-export-unsupported-features)
