Pull a JPG or PNG down to a smaller file size for the web, with a quality dial you can preview.
Every visual artefact you ship has a tool behind it. The tabs that do not need a design system: a drop-resize-compress loop before a hero lands, a QR for a poster, a swatch you picked off a screenshot. All of those happen in your browser, so the artefacts never leave the machine you are sitting at.
Serve a newer format when your stack can negotiate it and keep a JPEG fallback for everything else. Check what your CMS and your review process accept before converting a whole library, and do not expect a client on an older toolchain to open an AVIF you sent them.
Lossy encoders spend their budget on texture, so large flat areas and soft gradients show banding and blocking first. For screenshots, icons and interface art, prefer PNG or lossless WebP and reserve lossy JPEG for photographs.
Resize first, then compress. Encoding a 4000px image that will be displayed at 800px spends quality on detail that is about to be thrown away, and the artefacts you introduce at full size survive the downscale where they are harder to see and harder to justify.