Joomla 5 and 6 can upload and display WebP and AVIF images (AVIF since Joomla 5.0), and they lazy-load images that have a known width and height. Joomla core does not convert JPG or PNG to WebP or AVIF, and it does not create responsive image sizes. To serve next-gen formats you need one of four things: a Joomla extension, a server rewrite rule, a CDN, or manual conversion. Which one fits depends on how big the site is and what your hosting allows.
Quick answer
- Native support: Joomla 5 and 6 accept WebP and AVIF in the Media Manager and render them like any other image. Nothing converts automatically.
- To convert: an extension is easiest for sites where editors keep uploading. A server rule or CDN suits developers. Manual conversion works for a handful of images.
- AVIF needs server support: PHP 8.1+ with GD built with AVIF, or Imagick with AVIF. If you don’t have it, start with WebP.
- Measure it: run PageSpeed Insights before and after, check the LCP element, then watch Search Console’s Core Web Vitals report.

Does Joomla support WebP and AVIF natively?
Yes for displaying them, no for creating them. This is what Joomla core does with images, by version, based on the merged code changes and release notes:
| Version | What core does | Source |
|---|---|---|
| Joomla 4.0+ | Images rendered through the core image layout (for example article intro and full-text images) get loading="lazy", but only when Joomla knows the width and height. Images without dimensions are not lazy-loaded. Editors can also choose lazy loading and alt text when inserting images. |
PR #30218, PR #30784, Joomla Magazine |
| Joomla 4+ | The core Media Action – Resize plugin can shrink uploads that are larger than a set width and height. It resizes only; it does not change the format. (Joomla 5.3 fixed it so a blank dimension is ignored.) | PR #45311 |
| Joomla 5.0 | AVIF can be uploaded and rendered in the Media Manager. This default applies to new installs only, so older sites may have to allow AVIF themselves (steps below). | PR #41381 |
| Joomla 5.1.1 | “Proper support for avif/webp images”: AVIF added to the core Image class. WebP and AVIF files can’t be edited in the media editor (crop, rotate), because browsers handle them inconsistently there. |
PR #43295 |
| Joomla 6.x | Same behaviour as 5.x. The Media Manager defaults in the current code still list webp and avif as allowed image types. |
com_media config |
| Joomla 6.2 (13 Oct 2026, latest) | No image-format features. Its image changes are a TinyMCE picker that opens the Joomla Media Manager, separate CSS classes for the image and its figure on intro/full-text images, and subcategory images. | 6.2 release news |
| Not in core | Converting JPG/PNG to WebP or AVIF, generating srcset sizes, <picture> fallbacks, and fetchpriority for the LCP image. |
Use an extension, a template override, a server rule or a CDN |
For everything else in the latest release, see our Joomla 6.2 guide.
How to allow AVIF on a site installed before Joomla 5.0
If an AVIF upload is rejected, your site probably kept its old Media settings when you upgraded. In Joomla 5 and 6:
- Go to System → Global Configuration → Media (or Content → Media → Options).
- Add
avifto Allowed Extensions and to Legal Image Extensions (File Types). Check thatwebpis there too. - Add
image/avif(andimage/webpif missing) to Legal MIME Types. - Save, then upload a test AVIF file in Content → Media.
These are the field labels in the Joomla 6.2 code. On a fresh 6.2 install, all three fields already include WebP and AVIF.
Why does it matter for PageSpeed and Core Web Vitals?
PageSpeed Insights and Lighthouse flag JPG and PNG files that could be smaller (“Serve images in next-gen formats”, or “Improve image delivery” in newer Lighthouse versions). On many Joomla templates the hero or intro image is the Largest Contentful Paint (LCP) element, so its file size affects how fast the page looks loaded. Google’s guidance is that a good LCP is 2.5 seconds or less for at least 75% of page visits.
Google reports that lossy WebP images are 25–34% smaller than comparable JPEGs at equal SSIM quality, and lossless WebP is 26% smaller than PNG. Your results depend on the image and the quality setting, so compare sizes on your own files. Google also says good Core Web Vitals line up with what its ranking systems seek to reward, but content relevance comes first. Converting images will not by itself move a page up.
What do you need on the server before converting?
| Goal | What you need | How to check |
|---|---|---|
| WebP | PHP GD with WebP support, or Imagick with WebP | phpinfo → GD section shows “WebP Support: enabled” |
| AVIF | PHP 8.1+ with GD built with AVIF, or Imagick with AVIF | phpinfo → GD shows “AVIF Support: enabled” |
| Disk | Room for a second (and third) copy of each image | Your hosting panel’s disk usage |
| Memory and time | Enough memory_limit and max_execution_time for bulk jobs, which matters most for AVIF |
System → System Information → PHP Information |
A quick check from the command line, if you have SSH:
php -r 'print_r(array_intersect_key(gd_info(), array_flip(["GD Version","WebP Support","AVIF Support"])));'
On our PHP 8.4 test server this printed [WebP Support] => 1 and [AVIF Support] => 1. If AVIF shows as empty, use WebP for now. To raise the limits, see our Joomla PHP.ini settings guide.
Which conversion method should you use?

| Method | Best for | Converts existing images? | Handles new uploads? | Watch out for |
|---|---|---|---|---|
| 1. Joomla extension | Sites where editors keep uploading | Depends on the extension (bulk or on page view) | Yes | Server load on the first conversions; check that originals are kept |
| 2. Server rule (.htaccess / nginx) | Developers who control the server | Only if you generate the files | Only with a script or cron job | Caches and CDNs must respect Vary: Accept |
| 3. CDN / image service | Sites already behind a CDN | Yes, at the edge | Yes | Plan requirements; less control per folder |
| 4. Manual conversion | Small sites or a one-off redesign | Yes, by hand | No | You must update every reference |
Method 1: How do you convert images with a Joomla extension?
Image extensions on the Joomla Extensions Directory work in one of three ways:
- On page view, plus bulk: rewrites image URLs in the page output, creates WebP/AVIF copies when needed, and can convert whole folders in advance.
- On upload only: converts files as they’re uploaded through the Media Manager. Images already on the site are left alone.
- Scheduled bulk optimisers: run as Joomla scheduled tasks, and some send images to an external API.
Some examples, as described on their JED listings (checked 19 October 2026):
| Extension | How it works | Formats | Joomla | Type |
|---|---|---|---|---|
| WebP Converter (Infyways / JoomlaX, ours) | On page view plus bulk “Generate Images”; keeps originals; optional <picture> fallback |
WebP, AVIF | 4, 5, 6 | Paid |
| DC jWEBP | Converts on first page view, rewrites the HTML, adds native lazy loading | WebP | 5, 6 | Free |
| HC Image Optimizer | On Media Manager upload, with resizing and multiple size profiles; PHP 8.3+ | WebP | 5, 6 | Free |
| Webp converter for Joomla (JoomIQ) | On Media Manager upload only; no bulk conversion; can keep or remove originals | WebP | 5, 6 | Paid |
Disclosure: Infyways builds and sells WebP Converter through JoomlaX, our extension store. We’ve built 125 Joomla extensions since 2010. The steps below use it because it’s the one we know first-hand. The other extensions can be a better fit, for example if you only need conversion on upload.
Setting up WebP Converter, step by step
- Install: unzip the downloaded
WebPConverter_UNZIP.zipon your computer, then upload only the innerplg_system_webpconverter_…zipin System → Install → Extensions. - Enable: in System → Plugins, search “WebP Converter” and enable System – WebP Converter.
- First settings: in General Settings, set Image Format to WebP Only, WebP Quality to about 70–80, and leave Lightweight Processing on and Debug Mode off. Save.
- Test one folder: on the Image Management tab, tick one small folder, choose WebP Only and click Generate Images. With the default settings,
images/stories/photo.jpggets a copy atimages/webp/stories/photo.webp, and the original stays where it is. - Check: clear the Joomla cache (and the CDN cache), open the page, and search the page source for
.webp. - Add AVIF later: once WebP works and your server supports AVIF, switch Image Format to Both. Browsers that support it then get AVIF first, then WebP, then the original.
If PageSpeed still lists JPG URLs in Open Graph or schema tags, turn on Replace Image URLs Globally. You can exclude logos, animated GIFs, checkout pages or whole folders under Exclusion Settings. Full settings are in the WebP Converter documentation, and plans are on the product page.
Method 2: Can you serve WebP with .htaccess instead of a plugin?
Yes, if the WebP/AVIF files already exist next to the originals. The server checks the browser’s Accept header and quietly returns the smaller file at the same URL. Joomla, your articles and your template don’t change.

Step 1: create sibling files. This naming keeps photo.jpg and photo.png from colliding:
cd images
find . -type f \( -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.png' \) | while read f; do
[ -f "$f.webp" ] || cwebp -quiet -q 80 "$f" -o "$f.webp"
[ -f "$f.avif" ] || avifenc -q 60 "$f" "$f.avif" >/dev/null # optional
done
Step 2: add the rules to Joomla’s .htaccess, in a block of their own just above the line ## These directives are only enabled if the Apache mod_rewrite module is enabled:
<IfModule mod_mime.c>
AddType image/webp .webp
AddType image/avif .avif
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
# AVIF first, if the browser accepts it and photo.jpg.avif exists
RewriteCond %{HTTP_ACCEPT} image/avif
RewriteCond %{REQUEST_FILENAME}.avif -f
RewriteRule ^(.+)\.(jpe?g|png)$ $1.$2.avif [T=image/avif,L]
# Otherwise WebP, if accepted and photo.jpg.webp exists
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{REQUEST_FILENAME}.webp -f
RewriteRule ^(.+)\.(jpe?g|png)$ $1.$2.webp [T=image/webp,L]
</IfModule>
<IfModule mod_headers.c>
<FilesMatch "\.(jpe?g|png)$">
Header append Vary Accept
</FilesMatch>
</IfModule>
What we saw when testing it (Apache 2.4, one 1600×900 test JPG): the same /images/hero.jpg URL returned image/avif to an AVIF-capable Accept header, image/webp to a WebP-only header, and the original image/jpeg to */*. All three responses carried Vary: Accept. Try it on staging first, and confirm with curl -I -H "Accept: image/webp" https://example.com/images/hero.jpg.
- New uploads don’t get siblings until you run the script again, for example as a nightly cron job.
- Caches: any page or proxy cache must respect
Vary: Accept. Otherwise a browser that only handles JPG could be served a cached WebP. - Cloudflare: its docs say Polish may not run on responses with any
Varyheader other thanAccept-Encoding. Use either this rule or Polish, not both. - nginx has no
.htaccess. Use amap $http_acceptwithtry_files $uri$suffix $uriin the server block instead.
More about Joomla’s rewrite file: Joomla .htaccess guide.
Method 3: Can a CDN convert Joomla images for you?
Yes. Image CDNs check what each browser accepts at the edge and return a smaller format, so your server does no conversion work. For example, Cloudflare Polish keeps your image URLs and, with its WebP option on, serves a WebP version when the browser accepts it and the file comes out smaller. Polish is on Pro plans and above, and its docs note it won’t convert a JPEG when that would make the file bigger. Other image services (Bunny Optimizer, imgix and similar) work in a similar way. Check what your plan includes.
- Pros: no load on your server, no Joomla changes, and new uploads are covered automatically.
- Cons: it costs money, you get less control per folder, and images on other domains aren’t covered. You also depend on the vendor’s rules about when to convert.
Method 4: How do you convert images manually?
For a small brochure site or a redesign with a few dozen images:
- Convert in the browser with our free image to WebP converter, shrink files with the bulk image compressor, or use
cwebp/avifencon your computer. - Upload the
.webpfiles in Content → Media. - Update every article image, module and template reference to the new file.
- Keep the originals backed up offline.
This doesn’t scale: every new upload starts the problem again, and older browsers get no fallback.
How do you keep LCP fast once images are converted?
Converting the format is only half the job. Joomla core doesn’t handle these steps for you:
- Give images a width and height. Joomla only adds
loading="lazy"when it knows both, and setting them also stops layout shift (CLS). Images picked through the media field store their size in the URL (#joomlaImage://…?width=…&height=…). - Don’t lazy-load the LCP image. A hero image that appears straight away should load right away. Use a template override to set
loading="eager"andfetchpriority="high", or add a<link rel="preload" as="image">. - Size images for the layout. A 4000 px photo in an 800 px column is wasted bytes even as WebP. Joomla’s Media Action – Resize plugin can cap upload sizes. For
srcset, use a template override or an extension that creates the extra sizes. - Check CSS background images. Templates often load hero images from CSS, where only a server rule, a CDN or an extension that rewrites CSS backgrounds will swap the format.
For caching, compression and the rest of the stack, see the full Joomla speed guide.
WebP or AVIF: which should you use on Joomla?
| Question | WebP | AVIF |
|---|---|---|
| File size at similar quality | Smaller than JPEG/PNG (Google: 25–34% vs JPEG) | Often smaller than WebP; test on your images |
| Encoding on your server | Fast | Slower and uses more memory, so bulk jobs take longer |
| Server requirement | GD or Imagick with WebP | PHP 8.1+ GD with AVIF, or Imagick with AVIF |
| Transparency / animation | Yes / yes | Yes / yes |
| Editable in Joomla’s media editor | No | No |
| Use it for | Every site, as the baseline | Image-heavy pages (shops, galleries, portfolios), with a fallback |
Gains vary a lot by image, so run a few of your own images through both formats at your chosen quality and compare file size and appearance before converting a whole site.
How do you check that it worked?
- DevTools → Network: reload the page, click an image and check that the
content-typeisimage/webporimage/avif. - PageSpeed Insights: run the mobile test on pagespeed.web.dev. Check the next-gen image and image-sizing audits, and which element is the LCP.
- Field data: the “Discover what your real users are experiencing” panel uses Chrome UX Report data, a rolling 28-day window, so it changes slowly.
- Search Console → Core Web Vitals: once you’ve fixed the issue, use “Validate fix” and allow about four weeks for the field data to update.
- Purge caches: clear Joomla’s cache, your page-cache extension and the CDN, or you may keep testing the old JPG.
When should you get help?
Image-heavy shops, sites that use page builders with CSS background heroes, multilingual sites behind a CDN, and template overrides for srcset or fetchpriority are where DIY fixes usually stall. You can hire a Joomla developer from Infyways; a senior engineer replies within 12 hours.
Frequently asked questions
Does Joomla convert images to WebP automatically?
No. Joomla 5 and 6 can upload and display WebP (and AVIF since 5.0), but core doesn’t convert JPG or PNG files. Use an extension, a server rewrite rule or a CDN.
Does Joomla 6.2 add WebP or AVIF features?
No. Joomla 6.2 (released 13 October 2026) brought a TinyMCE picker that opens the Media Manager and separate image/figure CSS classes, but no format conversion.
Can I upload AVIF to the Joomla Media Manager?
Yes, since Joomla 5.0 on new installs. Older sites may need avif and image/avif added under System → Global Configuration → Media. WebP and AVIF can’t be edited in the media editor.
Does Joomla lazy-load images?
Yes. Joomla 4 and later add loading="lazy" to images rendered through the core image layout when the width and height are known. Editors can also choose lazy loading when inserting images.
What do I need on the server for AVIF?
PHP 8.1 or later with GD built with AVIF support, or Imagick with AVIF. Check phpinfo for “AVIF Support”. If it’s missing, start with WebP.
Can I serve WebP without a plugin?
Yes. Pre-convert the images, then use an .htaccess or nginx rule that serves the .webp file to browsers that accept it, with Vary: Accept. A CDN that converts at the edge also works.
Will converting delete my original images?
Not with converters that write separate copies. Some upload-time converters have an option to remove originals, so check that setting before a bulk run and keep a backup.
Why does PageSpeed still show JPG after converting?
Usually because of a cached page or CDN, a CSS background image, or Open Graph and schema tags that still point to the JPG. Purge all caches and turn on your converter’s URL-replacement option if it has one.

























