There is no magic button that makes a file smaller and keeps it pixel-perfect. But there is a right order of operations that gets you 90% of the way there while staying visually identical. Here is how I do it.
Most images are bigger than they need to be. A 4000-pixel-wide photo going on a website only needs to be 1600 or 1920 wide. Shrinking dimensions is the single biggest file-size win, and it costs you nothing visually. Use our image resizer to set the exact width.
If your image has no transparency and no text, it should be JPG or WebP, not PNG. A PNG screenshot can be ten times the size of the same image as JPG. Convert it with PNG to JPG, or go straight to WebP if it is heading to a website.
Tools that say "compress to 100KB" just keep lowering quality until they hit the number, which can wreck your image. What you actually want is a quality slider so you can find the sweet spot: usually 70 to 80 percent looks identical to the original while cutting size by 60 to 80 percent. That is exactly how the image compressor here works.
Every JPG save loses a little more. If you need to edit, always go back to the original, never the compressed copy. Otherwise you end up with the "generation loss" problem nobody warns you about.
One honest caveat: if you need transparency or you are printing large, stop after step one. Compression is not for you.