A large-format scan is 200 megabytes. A thousandth of that may reach the browser without visibly damaging the tonal range. Three tools are enough: the right format, the right size, the right compression.
Which format for what
AVIF compresses hardest and suits flat areas and gradients, WebP is the reliable alternative, JPEG remains the fallback. For black and white, test it: with fine grain AVIF occasionally smooths structure, and then WebP is the better choice.
Four sizes are enough
A portfolio needs variants around 640, 1280, 1920 and 2560 pixels wide. More steps create maintenance without measurable gain; fewer means phones download desktop images.
Setting srcset and sizes properly
srcset lists the widths you have; sizes describes how wide the image actually sits in the layout. Without sizes the browser assumes the full viewport width and loads too large — in grid layouts that is the costliest mistake.
Decide quality once
Between quality 72 and 85 the on-screen difference is barely visible, while the weight nearly doubles. Decide once against your own material, then automate — do not debate it per image.
