Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Learn how lazy loading works on next/image.
next/image loading offset is a minimal Next.js example from Vercel's examples collection that demonstrates how lazy loading works in the next/image component. As a documentation-oriented starter, it provides a small, runnable application that shows how the built-in lazy loading behavior of next/image behaves when applied to images below the fold.
next/image loading offset is a Vercel example project built with the Next.js React framework. It takes a plain Next.js application with a few images and produces a demo you can deploy or run locally to inspect how lazy loading works. The project is maintained in the vercel/examples GitHub repository and is intended as a reference implementation rather than a production template.
pnpm create next-app --example https://github.com/vercel/examples/tree/main/solutions/image-offset image-offset and then start the development server with pnpm dev.next/image component, which automatically optimizes images and uses native browser loading attributes for lazy loading.The example is meant to be used in one of two ways. First, you can deploy it instantly by clicking the Vercel deploy link, which creates a new project from the repository. Second, you can clone it locally using create-next-app and run it in development mode with pnpm. After deployment or local startup, the app renders a page with several images that are lazy-loaded as you scroll.
