A product photo is served as a 2 MB PNG and loads slowly. Which change most reliably shrinks the download with little visible quality loss?
- aRename the file's extension from
.pngto.jpgso the format changes - bRe-encode the photo to a lossy format such as JPEG or WebP✓
- cAdd explicit
widthandheightattributes to the<img>element - dReduce the image's opacity with CSS so it renders lighter
Explanation:Photographs compress far better in a lossy format like JPEG or WebP than in lossless PNG, which is meant for sharp-edged graphics. Renaming the extension (a) does not re-encode the bytes — the file stays a 2 MB PNG. Width/height attributes (c) reserve layout space and prevent shift, but do not change how many bytes are downloaded.