Publications Technical report

Nyquist™: the smallest image that still looks the same

Team
Ordnary AI Research, Applied research
Published
14 November 2026
Used in
Ordnary R2

Abstract

Images make up most of what a web page weighs. A single quality setting is always a compromise: too high for most photos, and visibly too low for some. Nyquist makes one decision per image instead. It searches for the smallest AVIF, WebP or JPEG that a perceptual metric scores as indistinguishable from the original. On our test set, files came out 11 to 25% smaller than with one fixed setting per format, with no difference people can see.

Key results

25%
smaller JPEG files
13%
smaller AVIF files
11%
smaller WebP files
0
changes to the original image
A colour field that breaks into ever larger blocks towards the right.
Figure 1. A colour field sampled into ever larger blocks: the trade-off between detail and size that Nyquist settles for every image separately.

Method

For every image, Nyquist encodes candidates in AVIF, WebP and JPEG at a range of quality settings. Each candidate is compared with the original using SSIMULACRA 2, a metric built to predict how different two images look to people. Nyquist keeps the smallest candidate that scores 80 or higher, the point where the difference is no longer visible in normal viewing.

The original stays untouched. The decision is made once per image and the result is kept, so visitors never wait for the search.

Formats
AVIF, WebP and JPEG, whichever the visitor's browser supports
Quality metric
SSIMULACRA 2, a perceptual metric
Threshold
A score of 80 or higher, indistinguishable in normal viewing
Original
Never changed; Nyquist only adds smaller versions

Why not a trained model

Nyquist comes out of the AI lab, but it isn't AI. We tested a trained model that predicts the right setting for each image, and it didn't beat a careful search.

A search is also easy to explain. For every image, you can see which candidates were tried, how they scored and why one was chosen. We kept the simpler method because it was the better one.

Evaluation

We measured Nyquist on 120 photos and confirmed the results on a second set of 400. Every saving is against one fixed quality setting per format, the way most sites serve images today.

How much smaller files are, compared with one fixed setting
  • JPEG 25%
  • AVIF 13%
  • WebP 11%
Figure 2. Saving per format with Nyquist, on the test set of 120 photos.
FormatSavingAt the 99% threshold
JPEG25%44%
AVIF13%23%
WebP11%16%
Table 1. Savings per format against one fixed setting, and at the 99% threshold.

Limitations

Our measurements use photos; illustrations, screenshots and animated images still need their own evaluation. SSIMULACRA 2 is one metric, and a threshold of 80 is a choice: a stricter threshold saves less, a looser one risks a visible difference.

Searching costs more compute than encoding once. Because the result is kept, that cost is paid once per image rather than once per visitor.

How to cite

BibTeX
@techreport{ordnary2026nyquist,
  title       = {Nyquist: The Smallest Image That Still Looks the Same},
  author      = {{Ordnary AI Research}},
  institution = {Ordnary},
  year        = {2026},
  month       = nov,
  url         = {https://ordnary.com/ai/nyquist}
}

Choose which cookies Ordnary may use. You can change this at any time via Cookie settings at the bottom of every page.