Search for a way to compress a photo without losing quality and you will find plenty of pages promising exactly that. Strictly speaking, none of them can deliver it, because most photo compression is lossy: it throws detail away on purpose to make the file smaller. What those pages actually mean, and what you can really get, is a file that looks identical at normal viewing sizes while weighing a fraction as much. That is a real result, and these steps get you there.
Step one: understand the two kinds of compression
Lossless compression keeps every bit of the original data. PNG works this way, which is why a PNG photo is often huge. Lossy compression, which is what JPG uses, studies the picture and removes the details your eyes are least likely to miss, such as tiny colour differences in a smooth sky. The saving is large and the loss is small, as long as you do not push it too far.
For ordinary photos, lossy compression through JPG is the right tool. Lossless formats matter more for screenshots, logos and text, where every sharp edge counts. Weighing lossless vs lossy compression for a photo almost always favours lossy, because the eye cannot catch what a good JPG throws away.
Step two: start from the original file
Every time a photo is saved as a JPG, a little more detail is thrown away. A picture that has already passed through a chat app, then a social media upload, then a screenshot, has been compressed several times before you even open it. Go back to the file straight from your camera or gallery whenever you can. It gives the compressor much more to work with.
Step three: remove what you do not need before you shrink it
Cropping is compression too, just a different kind. Every pixel you cut away is a pixel the file no longer has to store. If a form or a page only needs a face, cropping to the head and shoulders before you compress means the compressor can spend its budget on the part that matters, instead of a wall or a sofa in the background.
Step four: let quality do the heavy lifting first
JPG quality behaves in a curve, not a straight line. Going from full quality down to around 80 percent removes a large amount of file weight and is very hard to see. Going further, into the 30 or 40 percent range, saves much less weight for each step and starts to show as soft edges and blotchy colour, especially in skies and skin tones.
A good compressor looks for the highest quality that still fits your target, rather than picking one fixed number for every photo. The tool on this site works this way. You type a target size in KB or MB, and it searches quality levels until it finds the best one that fits.
Step five: resize the dimensions only when quality alone is not enough
If a photo is huge, for example several thousand pixels across, quality adjustments alone may not bring it down far enough without going too low. At that point, reducing the width and height is the better move, because a smaller but crisp photo usually looks better than a full size photo compressed harshly. This tool does that automatically once quality alone cannot reach your target, shrinking the picture a little at a time and checking again.
Step six: check the result at a normal size
Zoom into a compressed photo at 300 percent and you can always find some loss. That is not a fair test, because nobody views a photo that way. Look at it the size it will actually be seen, on a phone screen or in a form's thumbnail. If faces, text and edges look clean there, image quality after compression is exactly where it needs to be.
The best photo compression settings, briefly
There is no single number that suits every picture, which is why the best photo compression settings are really a method rather than a fixed value: search for the highest quality that meets your size target, instead of guessing one setting for every photo.
What to avoid
Do not compress the same file over and over. Each pass loses a bit more, and the losses add up even if each one looks small on its own. Do not use PNG for photographs. It is lossless, but the files are so much larger that people end up scaling the image down aggressively to compensate, which costs more real quality than a well chosen JPG would have. And do not chase the smallest possible file if you do not need to. A target that is generous but still under the limit you were given keeps more of the photo intact.
Reducing file size without losing quality, in the way that matters for a screen or a form, comes down to this order: crop first, let quality do most of the work, resize only if you must, and always start from a clean original.