The idea behind next-gen images to preserve the image quality, while offering smaller image file sizes. This can mean users download images quicker and get a better user experience. JPEG and PNG are more traditional formats. WebP images can be used to encode either, typically the image is degraded slightly but much smaller than the original. AVIF is a newer, next-gen format offering improvements on WebP compression. WebP currently enjoys wider support than AVIF, so serving fallback alternatives is best practice. The browser can iterate through the alternatives you supply until it finds one it can work with. The latest format is JPEG XL, this looks like a promising replacement as the standard, the support needs to grow a little before it can get there.