Vercel

Build a fast, animated image gallery with Next.js

Jan 9, 2023
Build a fast, animated image gallery with Next.js
SummaryAI, from the source post

This post details the techniques used to build a performant image gallery site using Next.js and Cloudinary. Key contributions include: 1. Fetching images at different resolutions for various display contexts (grid, modal, individual routes) using Cloudinary's Transformation URL API. 2. Implementing image blur placeholders by fetching images at a small size, blurring them, converting to base64, and minifying them using `imagemin` for instant loading. 3. Demonstrating the use of the Next.js Image component with properties like `placeholder`, `blurDataURL`, `width`, `height`, `loading`, and `sizes` for optimized image rendering. 4. Explaining the use of the `Link` component's `as` prop and `shallow` prop for maintaining a single page with dynamic query parameters for animated transitions.

More from the Image Format Optimization trail