Why "compress to 200 KB" is a search and not a setting
JPEG quality is not a file size. A quality of 80 might produce 90 KB from a flat graphic and 900 KB from a detailed photograph, because the setting controls how much detail is discarded, not how many bytes come out. Any tool offering a quality slider when what you asked for was a size is handing you the problem back.
So the only honest way to answer is to encode the image, measure the result, adjust, and repeat. A binary search across the quality range converges in about seven attempts, each taking a few milliseconds, which is why this feels instant despite being brute force.
When quality alone cannot get there — and for an aggressive target on a large photo it often cannot — the dimensions come down too, by 25% at a time. That is a real change to your image, so it is disclosed in the status line rather than done quietly.
What gets thrown away
JPEG and WebP discard the detail your eye is least likely to miss: fine colour variation first, then high-frequency texture. On a photograph the result is very hard to tell apart from the original until you zoom. On text, line art or a screenshot it is obvious immediately — letters grow a grey fringe, flat colours develop mottling.
That is the rule worth remembering. Photographs compress beautifully. Anything with hard edges and flat colour should be a PNG, and a PNG that is too large usually needs fewer pixels rather than more compression.
Metadata goes as well. Re-encoding through a canvas drops the EXIF block entirely, which includes the GPS coordinates most phones record. That is a side effect of how this works, and a welcome one.
When compressing is the wrong answer
If the image is already smaller than your target, compressing achieves nothing except losing detail, and the tool says so and refuses rather than producing a worse file to satisfy the instruction.
If the image is enormous in dimensions — a 6000 pixel photo destined for a 600 pixel slot — resizing will beat compressing every time, and by a wide margin. Reducing the dimensions by half removes three quarters of the pixels before any quality question arises. Compress after resizing, not instead of it.
Everything here happens in this browser tab. The image is decoded, redrawn and re-encoded by the Canvas API on your own device, and the result is assembled in memory and handed to you as a download. Nothing is uploaded, which you can confirm in about fifteen seconds with the network panel open.