JPEG has been the default photographic web format for decades, while WebP was designed for efficient web delivery and supports both lossy and lossless modes. For many websites, WebP can reduce transfer size at similar visual quality, but that does not make JPEG obsolete.
Compression and visual quality
Both JPEG and lossy WebP discard some image information to reduce file size. Results depend strongly on the encoder, quality setting and image content. A single percentage value should not be treated as equivalent across different formats or tools.
Compatibility
Modern browsers broadly support WebP, while JPEG remains one of the safest formats for interchange with old software and non-web workflows. If users download images for editing or office documents, JPEG may still be more convenient.
Transparency and animation
JPEG does not support transparency or animation. WebP can support transparency and animated images, which expands its use beyond photography.
Practical website workflow
Test real images at the dimensions they will actually be displayed. Compare visual quality, file size and your audience requirements. Keep a high-quality source and generate delivery formats from that source rather than repeatedly converting compressed copies.