Prepare images for a website
A product image displayed at 800 CSS pixels may benefit from a 1600 pixel source on high-density screens.
How to do it
Calculate the target height from the original aspect ratio, resize, then compress a copy if necessary.
Check your result
Inspect the image on mobile and desktop. Avoid enlarging a small source because interpolation cannot restore detail.