Start with pixel dimensions
Check how large the image is displayed. If an image is 5000 pixels wide but appears at 700 pixels on a page, creating a smaller derivative can avoid encoding pixels that will never be seen. Account for high-density screens and responsive widths before shrinking aggressively.
Reducing quality can further reduce bytes, at the cost of image detail. Compare the result and retain the source file for later edits or larger uses.
Metadata and format choices
Camera information, GPS coordinates, embedded thumbnails and editing history can add bytes. A re-encode may omit much of this metadata, but exact behavior varies by browser and the method is not a secure-erasure guarantee.
WebP may yield a smaller photo at a similar appearance in current browsers. Measure actual outputs; changing extension alone does not guarantee a smaller file.
Frequently asked questions
Does a smaller file always load faster?
Smaller image transfers usually reduce network bytes, but page loading also depends on request timing, caching, dimensions, decoding and layout.