What this image compressor changes
Two things, and you control both.
The quality setting drives the lossy encoder. Lower it and the codec rounds off more of the fine high-frequency detail in each block of pixels, which is where the bytes go. On photographs this is remarkably hard to see down to about 75 percent, which is why that is the default here rather than the near-lossless 92 the converters use.
The optional width and height cap is the other lever, and often the more effective one. A 4000 pixel photo displayed in a 800 pixel column is carrying five times the pixels it needs. Capping the dimensions removes data that was never going to be visible, which beats compressing detail that at least someone might have seen.
Why PNG behaves differently
PNG is lossless. There is no quality dial that means anything for it, so a compressor that shows you one is showing you a control that does nothing.
Here, a PNG keeps its format and the quality setting is ignored. The way to make a PNG smaller is to reduce its dimensions, which the size fields do. If the image is a photograph rather than a graphic, the better move is converting it to JPG or WebP, and this site has a page for each.
When you compress image files and nothing happens
The size readout after each file exists for this. If it reports a saving of two percent, the file was already compressed, and squeezing it again costs a little quality for almost no bytes.
This is common with images downloaded from the web, exported from a CMS, or sent through a chat app, since all of those compress on the way through. In that situation the honest answer is that there is nothing left to win, and the readout is what tells you so instead of leaving you guessing.
What to keep
Treat compressed files as publishing output, not as working files. Compressing an already compressed file stacks generations of loss, and each round is worse than the last. Keep the camera original or the editor export, and compress from that each time you need a web version.
Local and private
Every file is decoded and re-encoded inside this browser tab. Nothing is uploaded, so there is no size cap imposed from outside and no copy of your photos sitting on someone else's disk.