Now we need some tooling where you put in a maximum error bound, and it automatically finds the lowest resolution you can get away with. I wonder if one of those video-codec-based image formats (WebP, HEIC, AVIF) would already do something pretty similar if you just set a quality factor?