How to reduce image size while preserving detail
First decide what must survive the export. A technical drawing may need every pixel value unchanged. A listing photograph may only need to look just as good at its published size.
Preserve exact pixel values
For flat artwork, try lossless PNG encoding and compare the result with the original. Already optimized files may grow slightly after another export. Removing metadata can save space while leaving the visible picture intact, although color profiles and print or orientation information can affect how other software interprets it. Keep the original if those properties matter.
Match the viewing conditions
For a photograph shown at 800 CSS pixels wide, a 1600-pixel version supplies two source pixels per CSS pixel on a high-density display. Start there if the design never offers a larger view. Downsampling discards source detail, but may make no visible difference at that particular display size.
Export once from the master
Crop, resize and adjust colors before the final lossy encode. Repeating a JPG save from yesterday’s JPG accumulates damage. Compare your candidate with the master at normal viewing size, then inspect high-contrast edges. Keep whichever file meets the visual requirement and occupies fewer bytes.