Skip to content
Dashboard

Images on the web

Staff Developer Advocate

Learn about the differences between image formats, compression techniques, resolution capabilities, pixel density, and effects on user experience.

Link to headingCompression Algorithms

Link to headingPixel Density and Resolution

Link to heading
Bit Depth

Link to headingChroma Subsampling

Link to headingProgressive vs. Baseline Loading

Baseline loading
Baseline loading
Progressive loading
Progressive loading

Link to headingAlpha Channel (Transparency)

Link to headingMetadata and Exif Data

Exif data demo: https://photos.sambecker.com/
Exif data demo: https://photos.sambecker.com/

Link to headingJPEG (Joint Photographic Experts Group)

Link to headingPNG (Portable Network Graphics)

Link to headingWebP

Link to headingAVIF (AV1 Image File Format)

Link to headingNext.js Image component

next.config.js
module.exports = {
images: {
formats: ['image/avif', 'image/webp'],
},
}

This configuration enables AVIF support. If the `images.formats` property is omitted, it defaults to WebP.

// Good quality. A balance between image clarity and file size, suitable for most web use cases.
<Image quality={75} />
// Maximum quality. Ensures the best clarity but results in the largest file size.
<Image quality={100} />
// Very low quality. The image will be compressed significantly, resulting in a smaller file size but noticeably reduced clarity.
<Image quality={33} />

// Takes full viewport width on screens up to 768 pixels wide, otherwise half viewport. Useful for mobile devices in portrait mode.
<Image sizes="(max-width: 768px) 100vw, 50vw" />
// Half viewport with on devices up to 768 pixels wide. For devices between 769 and 1200 pixels wide, it will take up a third of the viewport width. Useful for images in multi-column layouts
<Image sizes="(max-width: 768px) 50vw, (max-width: 1200px) 33vw, 20vw" />
// Regardless of the device's width, the image will always render at 500 pixels wide.
<Image sizes="500px" />

Link to headingConclusion


Ready to deploy?