Definition
Image compression removes redundant data from pictures. JPEG and WebP are lossy formats suited to photographs, while PNG is lossless and suits screenshots, logos and graphics with flat colour.
For web use, resize images to the largest size they will display, then compress to the smallest quality that still looks good. This often reduces file size dramatically without visible change.
Keep originals in an archive and create compressed copies for publishing.