Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
An image gallery template built with Next.js, Vercel Blob, and Tailwind CSS, featuring blur placeholders and optimized images.
The Next.js Image Gallery Starter Template (also called the with-vercel-blob example) is an official Next.js example from Vercel that turns a Vercel Blob store full of images into a responsive gallery site built with Next.js and Tailwind CSS.
This template is a complete codebase for an image gallery website. It takes Vercel Blob storage as its image source and produces a gallery page where every image is optimized by next/image and rendered on a Tailwind-styled page. It runs on Next.js and is intended to be deployed to Vercel, but you can also run it locally. The template was published in Vercel's Next.js examples repository.
@vercel/blob SDK's list() API to find every image stored in the root of your Vercel Blob store when the site is built.next/image for a blur-up effect before the full image loads.url is served directly through next/image, which generates responsive avif and webp variants on demand via Vercel's image optimizer.npx create-next-app --example with-vercel-blob with-vercel-blob-app.next/image and sharp.next/image optimization.The workflow follows the setup steps in the README. First, create a Vercel Blob store and upload images to its root. Then copy .env.local.example to .env.local and set BLOB_READ_WRITE_TOKEN to the store's read/write token. After installing dependencies and running npm run dev, the app calls the blob SDK's list() API at build time, processes each image with sharp, and renders the gallery using next/image.
The template code itself is open source as part of the Next.js repository. However, Vercel Blob is a paid storage service with its own pricing tiers, and deploying to Vercel uses the platform's free or paid plans.
You need a Vercel account to create a Vercel Blob store, because the template reads images from a blob store using a token. You can run the project locally once that token is set in .env.local.
The only required environment variable is BLOB_READ_WRITE_TOKEN, the read/write token for your Vercel Blob store. The example's .env.local.example file shows where to put it.
No, the example is specifically written for Vercel Blob. It imports the @vercel/blob SDK and calls its list() API, so switching to S3 or another provider would require rewriting the data-fetching code.
At build time, the template uses the sharp image processing library to read each image's dimensions and generate a base64 blur placeholder. Those values are then passed to Next.js's next/image component, which handles the responsive and format optimization.