Next.js Image Generator
Drop an image to generate a next/image component with the data URI inlined. Set width, height, priority, placeholder, and responsive sizing, then copy or download.
1. Image & options
LocalDrop an image here
or click to browse · or paste with Ctrl/Cmd + V
2. Generated component
—About Next.js Image Generator
The Next.js Image Generator turns a dropped image into a next/image component with the data URI inlined, letting you set width, height, priority, and placeholder. It is for Next.js developers scaffolding an optimised image component.
The next/image component has several required and optional props that are easy to misconfigure. Generating it locally fills them in correctly with the image inlined.
Step by step
- Drop an image into the tool — Next.js Image.
- Set width, height, priority, and placeholder options.
- The next/image component is generated with the data URI inlined.
- Review the component — Next.js Image.
- Copy it into your project — Next.js Image.
What it offers
- next/image component output
- Width, height, priority, and placeholder options
- Inlined data URI — Next.js Image
- Generated in the browser — Next.js Image
Where it helps
- Scaffolding a next/image component for a small image
- Setting priority on an above-the-fold image
- Producing a component with width and height set correctly
- Embedding a graphic in a Next.js page
Tips for best results
- For images Next.js can optimise, prefer a sourced file over inlining.
- Always set width and height to avoid layout shift.
- Reserve priority for the most important above-the-fold image.
Pitfalls to watch for
- Inlining a large image rather than letting Next.js optimise a sourced file.
- Omitting width and height, which next/image needs to avoid layout shift.
- Setting priority on many images, which defeats its purpose.
Why people use it
Correct props
Width, height, and options set for you.
Self-contained
The image is inlined in the component — Next.js Image.
Layout-stable
Dimensions help prevent shift.
Private
Encoding happens on your device — Next.js Image.
Common questions
This runs entirely in your browser
No file or text you enter here is uploaded. Encoding and decoding happen on your device using native browser APIs — close the tab and nothing remains on a server.