On most websites, images represent the heaviest share of a page's total weight, well ahead of code or fonts. The format chosen for these images therefore directly influences loading speed, and by extension the visitor experience as well as the Core Web Vitals metrics tracked by Google. Two modern formats, AVIF and WebP, have gradually replaced classic JPEG on well optimized sites, but choosing between the two depends on context rather than a universal answer.
What each format actually brings
JPEG, the historic format of the photographic web, remains universally compatible but produces noticeably heavier files than newer formats at equivalent visual quality. WebP, developed by Google, significantly reduces file weight compared to JPEG while keeping near universal compatibility with current browsers. AVIF, more recent, goes even further in compression, with files generally lighter than their WebP equivalents at similar perceived quality, and also handles capabilities WebP does not offer, such as wide color gamut useful for professional photography.
The trade off between compression and compatibility
AVIF now shows a high compatibility rate with recent browsers, but remains less well supported than WebP in certain desktop applications, such as some image viewers or office suites, which can be a problem if the site's images are also meant to be downloaded and opened locally by visitors. Encoding an image in AVIF also requires more processing power than WebP, a point that can slow down an automated image processing pipeline on a site with a large product catalog.
The recommended strategy for most sites
For a showcase site or a typical blog, the most robust practice is not to permanently commit to a single format, but to use the HTML picture element, which allows offering several versions of the same image and letting the visitor's browser automatically choose the version best suited to its capabilities, with a preference order going from AVIF to WebP then JPEG as a last resort. This approach guarantees full compatibility, including for visitors using an old or less common browser, without sacrificing performance gains for the majority of visitors using recent browsers.
The special case of WordPress
For several versions now, WordPress automatically converts certain images to WebP upon upload, without manual intervention. To go further with AVIF and finer fallback format management, dedicated image optimization plugins handle this automatic conversion and generate the appropriate picture tags, avoiding tedious manual work on every image on the site.
The cases where JPEG or PNG remain relevant
PNG retains its usefulness for images requiring transparency combined with perfect color accuracy, or for screenshots and graphics with sharp text, a case where lossy compressed formats can introduce visible artifacts. JPEG also keeps its place for uses where universal compatibility matters above all, such as attachments meant to be opened in older desktop software, or print workflows, two contexts very different from web display.
A choice that depends on content, not a single rule
A site focused on professional photography or a product catalog with highly detailed visuals benefits more from AVIF's advanced capabilities than the average showcase site. Conversely, a site with a limited volume of images and a preference for technical simplicity can be well served by WebP alone, with a performance gain already very noticeable compared to a site still entirely in unoptimized JPEG.
Points to verify before publishing: confirm at the time of publication the current browser compatibility rates for AVIF and WebP, since these figures evolve with browser updates, and check that the description of WordPress's native behavior regarding automatic image conversion remains accurate for the current version.