Having an optimised website is important for attracting and retaining visitors. One effective way to enhance your website’s performance is by serving images in next-gen formats, such as WebP and AVIF. These modern image formats offer better compression and quality compared to traditional formats like JPEG and PNG. This improves your website’s speed and user experience. If you are using WordPress as your content management system, here is how you can serve images in next-gen formats.
Check Web Server Support for Next-Gen Image Formats
To properly serve these photos, make sure that your web server supports next-gen image formats such as WebP and AVIF. This will allow you to serve next-gen formats on your WordPress website.
- Determine if you are using Apache, NGINX, or another server.
- Check for Built-in Support. Many modern web servers have built-in support for next-gen formats.
- Enable Support if Needed:
- For NGINX: Install the
ngx_http_imagex_module
. - For Apache: Install the
mod_pagespeed
module.
- For NGINX: Install the
Generate Next-Gen Versions of Your Images
The next step is to convert your existing images to WebP or AVIF formats. This will allow your website to serve optimised images.
- Choose a plugin that automatically converts your images to next-gen formats:
- Imagify: Imagify Plugin
- WP Smush: WP Smush Plugin
- ShortPixel Image Optimizer: ShortPixel Plugin
- Follow the plugin instructions to set up and optimise your images.
- These plugins will also automatically generate next-gen image versions of your existing images when they are uploaded to your WordPress media library.
Update Your WordPress Theme
Make sure your WordPress theme can properly display next-gen image formats to maintain the visual integrity of your website.
- Verify if your theme supports next-gen image formats.
- Test Your Website:
- Enable next-gen image formats on your site.
- Check that all images are displayed correctly.
- If your theme does not support these formats, consider updating it or switching to a more modern theme.
To find out more visit our FAQs page!