Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to resolve the “serve images in next-gen formats” issue on the lighthouse report


SEO experts and developers, we understand that web performance is essential to our success.

We strive to create sites that are fast, efficient, and engaging to our users. One way of achieving this is to serve images in nextgen formats.

👉 Also read: minify CSS and JavaScript

Nextgen image formats are a new class of image formats designed to reduce file sizes while maintaining image quality.

By leveraging advanced compression algorithms, these formats can reduce image file sizes by up to 80% compared to traditional image formats, such as JPEG and PNG.

This means faster loading times, improved performance, and better user experience.

In this guide, SEO Consultant Luca Tagliaferro will discuss the basics of nextgen image formats and how to serve them on your website.

He’ll also discuss some of the best practices for optimizing your images for performance.

Serve Images in Next-Gen Format: A Guide for Webmasters

What are NextGen Image Formats?

 

Nextgen image formats are a new class of image formats designed to reduce file sizes while maintaining image quality.

Common examples include WebP, JPEG XR, and JPEG 2000.

These formats leverage advanced compression algorithms to reduce file sizes, often by up to 80%.

The primary benefit of nextgen image formats is improved performance.

By reducing the size of images, webpages load faster and users experience better performance.

This is especially important for mobile users, who often have slower connections and limited bandwidth.

How to Serve NextGen Image Formats


Serving nextgen image formats on your website is relatively easy.

All you need to do is add a few lines of code to the head> of your webpage.

For example, if you wanted to serve WebP images on your website, you would add the following code to the head> of your webpage:

				
					<picture><source srcset="image.webp" type="image/webp"></source></picture>
			

This code tells the browser to look for an image with the .webp extension first.

If it cant find one, it will then look for the default image format (in this case, .jpg).

You can also use the picture> element to specify different images for different device sizes.

For example, you could specify a larger image for desktop users and a smaller image for mobile users.

This can help reduce bandwidth consumption and improve performance for mobile users.

Best Practices for Optimizing Images


In addition to serving nextgen image formats, there are a few other best practices you should keep in mind when optimizing your images for performance.

First, always make sure youre using the correct image format for the job. For example, PNGs are great for images with large areas of solid colours, while JPEGs are better for images with more detail.

Always use the format that will produce the smallest file size for the job.

Second, always compress your images before uploading them to your website.

You can use tools (more on this below) such as ImageOptim or ImageAlpha to reduce the file size of your images without sacrificing quality.

Finally, use responsive images. 

Responsive images are images that are displayed at the correct size for the device theyre being viewed on.

This helps reduce bandwidth consumption and improve performance.

You can use the picture> element to specify different images for different device sizes. 

A short guide on how to convert PNG to WebP images

1. Use Online Tools: One of the easiest ways to convert PNG to WebP is to use an online conversion tool.

There are several free online tools available (see below) that allow you to upload a PNG image and have it converted to WebP within seconds.

Simply upload the image, select the desired settings, and click theconvert button. The converted WebP image will be downloaded to your computer once the conversion is complete.

2. Use Photoshop: For those who already have Adobe Photoshop installed, you can use the program to easily convert PNG images to WebP.

To do this, open the PNG image in Photoshop and go toFile > Export.

Then selectWebP from theFormat dropdown menu and clickExport.

You can also tweak the image settings as desired before saving it in the WebP format.

3. Use ImageMagick: ImageMagick is an opensource software package that can be used to convert images between different formats.

To convert a PNG image to WebP using ImageMagick, open your terminal and enter the following command: 

convert input.pngdefine webp:lossless=true output.webp Replaceinput.png with the name of your PNG image, andoutput.webp with the name of the file you want the WebP image to be saved as.

4. Use cwebp: cwebp is a commandline tool specifically designed for converting images to WebP format.

To use cwebp, open your terminal and enter the following command: cwebp input.pngo output.webp 

Replaceinput.png with the name



This post first appeared on SEO Consultant And Software Reviews, please read the originial post: here

Share the post

How to resolve the “serve images in next-gen formats” issue on the lighthouse report

×

Subscribe to Seo Consultant And Software Reviews

Get updates delivered right to your inbox!

Thank you for your subscription

×