Resources

Ecommerce Guide: How to Serve Images in Next-Gen Formats

April 23, 2024

three computer screens in a row moving upwards.
Written by: 

In this blog

Book a Free Demo

If you're running late to work, would you choose to ride a bike or take a leisurely stroll? Naturally, you'd pick the bike because it gets you there much faster. The same mindset should be applied when loading images on your eCommerce site. While traditional formats like JPEG and PNG will get the job done, they don't operate nearly as swiftly as Next-Gen image formats—the bike option in this analogy.

The problem with traditional image formats, especially when handling high-resolution or complex images, is that they consume considerable bandwidth and strain server resources. This results in slower page rendering, a degraded user experience, and a negative impact on your site's SEO rankings.

So, how can you avoid these pitfalls? The solution lies in Next-Gen Image Formats. In this blog post, we'll explore why these formats are critical, how to implement them on your eCommerce site, and the transformative effects they can have once in place.

Let's dive in.

Understanding Next-Gen Image Formats

So, what exactly are these Next-Gen Image Formats that can give your store that extra performance boost? Next-Gen Image Formats are advanced, modernized file formats specifically optimized for web use. They deliver superior compression and maintain higher quality than traditional formats such as JPEG or PNG. This makes them ideal for enhancing site speed and visual appeal without sacrificing image quality.

 Let’s review the top three Next-Gen formats out there: 

WebP: Created by Google to make online images less bulky, WebP is a modern image format that provides superior lossless and lossy compression for images on the web. Using this format creates smaller, richer images that make your website faster. 

AVIF: Created by AOM, AVIF format provides royalty-free images with better compression efficiency and more feature support compared to the existing image formats. This format is compatible with high-dynamic-range imaging providing optimal compression. 

JPEG XL: Developed by JPEG, JPEG XL is tailored to meet the demands of image delivery on the web and in professional photography. This royalty-free raster graphics file format was specifically crafted to supplant the outdated legacy JPEG. Supporting both lossy and lossless compression, JPEG XL boasts significantly enhanced compression efficiency, achieving a remarkable 60% improvement compared to JPEG.

Now that we’ve explored what Next-Gen Image Formats are, let's delve into how to select the most suitable format for your eCommerce site.

Choosing the Right Format

Choosing the right image format for your site requires balancing compatibility with compression efficiency. WebP and AVIF stand out as the primary choices in this regard. 

physical scale with WebP logo on one side and AVIF logo on the other side of the scale.

WebP, which is widely supported across numerous web browsers including Google Chrome, Safari, Firefox, and Edge, offers a dependable option due to its broad compatibility. It provides an excellent balance between compression efficiency and browser support, making it a versatile choice for most use cases.

On the other hand, AVIF, though newer, offers superior compression efficiency, often resulting in smaller file sizes without sacrificing image quality. However, its browser support is more limited, currently available only in Chrome, Opera, Firefox, and Safari as of 2021. This emerging support might restrict AVIF’s immediate use in some scenarios.

Thus, when choosing between WebP and AVIF, it’s essential to consider the trade-off between widespread compatibility and the benefits of advanced compression. Selecting the right format should align with the specific needs and circumstances of your project.

Why Serving Images in Next-Gen is Important? 

If you've found your way to this guide, you're evidently attuned to the importance of staying ahead of evolving consumer expectations and standards. You understand that change is necessary for growth; therefore, let's review the beneficial changes that come with switching to Next-Gen Image Formats.

Versatility
No longer do you need to fret over compatibility issues or distorted images on varying screen sizes. Next-Gen formats ensure that your images will adapt effortlessly to any screen, enhancing the accessibility and usability of your website. These formats provide unmatched flexibility, guaranteeing seamless rendering and optimal viewing experiences for your audience.

Site Performance
A commonly recommended tip from Google PageSpeed Insights to boost page speed and performance is to "utilize Next-Generation Image Formats." This advice underscores the need for faster web performance, improved user experiences, and compatibility with emerging technologies. Next-generation image formats leverage advanced compression and encoding techniques, significantly reducing the data needed to render images, thus taking up less storage space. Ideal for web applications and mobile devices with limited bandwidth, these formats lead to faster loading times for users.

Image Quality
Images play a crucial role in conveying messages and successfully selling products in ways that words alone cannot. With Next-Gen Image Formats, you can produce smaller file sizes while maintaining or even enhancing image clarity, sharpness, and color accuracy. Additionally, next-gen formats support features like improved transparency handling (with alpha channels) and HDR (High Dynamic Range), contributing to richer, more vibrant images.

Core Web Vitals (CWV)
Implementing Next-Gen Image Formats substantially boosts key Core Web Vitals (CWV), critical metrics for measuring website performance. These formats facilitate smaller image file sizes and faster webpage loading times, significantly improving the Largest Contentful Paint (LCP)—a crucial CWV metric indicating prompt content delivery and signaling a superior user experience to search engines. Moreover, the reduced file sizes minimize the chances of image loading issues, thus enhancing website reliability—an aspect search engines consider in rankings.

User Experience (UX)
In our tech-driven world, where instant gratification is expected due to constant social media engagement and quick delivery services, it's clear why your eCommerce site needs to incorporate Next-Gen Image Formats. Slow image loading, especially from ads, likely leads to user frustration and increased bounce rates, as evidenced by a Google study showing a significant spike from a 1-second to a 3-second load time. Next-Gen Image Formats reduce bounce rates by accelerating load times, sustaining user engagement, and encouraging deeper site exploration. Although enhanced UX may not directly affect SEO, it is a crucial factor that indirectly boosts it. Furthermore, with mobile searches now outnumbering desktop searches, search engines favor mobile-optimized websites. Next-Gen Image Formats help reduce file sizes, thus improving page loading speeds on mobile devices where bandwidth may be limited, leading to enhanced mobile SEO.

Overall Search Visibility
Optimizing your images can significantly boost your website's overall search visibility. Google prioritizes websites that load quickly, and by reducing image file sizes, your site benefits from faster load times and improved Core Web Vitals. These enhancements contribute to higher rankings on search engine result pages (SERPs), attracting more organic traffic to your site. Swift load times, exceptional UX, and strong Core Web Vitals will collectively enhance your site's ability to rank higher in SERPs. Additionally, optimizing images to smaller sizes improves your site's performance in Google's image search, which, while not directly impacting overall search rankings, increases your site’s visibility and reach, potentially leading to increased engagement and conversions.

How to Convert Images into Next-Gen Formats

Converting your images to next-generation formats like WebP or AVIF, which is highly recommended by Google and widely supported across browsers and devices, can significantly enhance your website's appeal and performance. Here's how you can create and optimize next-gen images:

Image Editing Tools

Several image editing tools and online converters can help you transition to next-gen formats:

Adobe Photoshop: A leader in image editing, Adobe Photoshop offers support for exporting images as WebP files. Simply open your image, click on 'File' > 'Export' > 'Save for Web (Legacy)' and select WebP in the format options. It’s that simple!

GIMP: If you're looking for a free and open-source alternative that also supports WebP, GIMP is a great choice. After installing the necessary plug-ins, you can save images in WebP by selecting 'File' > 'Export As' and choosing WebP from the list of formats.

Online Converters: Tools like CloudConvert, Convertio, or Squoosh.app allow you to convert images to WebP or AVIF formats directly from your browser without the need for installing software.

Export Settings:

To save an image in WebP or AVIF formats using these tools, follow these general steps:

1. Open your image in the editor.

2. Navigate to the export options.

3. Select 'WebP' or 'AVIF' as the format.

4. Adjust the quality settings to balance file size and image quality. Typically, setting the quality between 80-90% yields good results while significantly reducing the file size.

Optimization Tips

Finding the ideal quality and compression balance is crucial for maintaining image quality while minimizing load times:

Test Different Settings: Experiment with various quality percentages to see how much you can compress an image before noticing quality degradation.

Use Automation Tools: Automation tools like ImageOptim (for macOS) or RIOT (for Windows) can help streamline the process of batch converting and optimizing images.

Consider the Usage Context: For images needing high visual fidelity (like product photos), opt for higher-quality settings. For decorative background images, you can often use lower-quality settings without noticeable effects.

By following these tips, you can effectively and efficiently convert your images to next-gen formats, ensuring faster page loads and improved overall performance of your digital assets.

Implementing Next-Gen Images on Your eCommerce Site

Now, if you've got this far, you mean business. Let’s discuss the best ways to implement your new Next-Gen Images on your eCommerce store. 

Use HTML Markup

Leveraging the <picture> element in HTML allows you to specify multiple sources for a single image, enabling the browser to choose the most suitable format and size based on the device and browser capabilities. Here's an example of how to use the <picture> element:

This markup tells the browser to load the WebP format if supported; if not, it falls back to the JPEG format.

Modify the .htaccess File

For Apache servers, you can modify the .htaccess file to include rules that enable automatic WebP delivery if the browser supports it:

This configuration checks if the WebP version of an image exists and if the requesting browser supports WebP, then serves the WebP image instead of the JPEG or PNG version.

Content Negotiation

Content negotiation is a crucial process in web development where the server offers the best version of a digital asset - like images or videos, in line with the capabilities of the client's device. The server gauges client preferences like file formats, language, encoding methods, and display resolution from the HTTP headers. Through this, it delivers content that matches the client's needs to a tee, all in the name of enhancing the user's experience. 

To implement content negotiation for images on your website, follow these streamlined steps:

  1. Configure Your Server: Set up your server to enable content negotiation, using modules like Apache’s mod_negotiation for configuration.
  2. Prepare Multiple Image Formats: Create versions of your images in different formats, such as WebP and AVIF, to cater to various client needs.
  3. Utilize the Accept Header: Leverage the Accept header in HTTP requests to determine and deliver the appropriate image format based on what the client can handle.
  4. Optimize with Vary Header: Implement the Vary header to manage HTTP cache correctly, ensuring devices receive the correct image format as per their capabilities.
  5. Test and Validate: Use tools like Google Chrome’s DevTools to test image delivery across different devices and network conditions, ensuring optimal setup.

When you implement content negotiation, you streamline the development process by doing away with the need for several versions of custom HTML markup customized for varying scenarios. This simplicity not only lessens the possibility of errors in the code but also enhances the performance of the website. With servers configured for content negotiation, you only send the version of content that best matches the client, leading to a reduction in unnecessary data transfers and an improvement in load times. Such benefits come in handy in environments with varying connection speeds or on mobile devices with limited bandwidth.

Website Optimization Begins 

You are now fully equipped to integrate Next-Gen Image Formats into your eCommerce website. By adopting these advanced technologies, your site is well-positioned to excel in a competitive market, ensuring faster load times, enhanced user experiences, and improved SEO performance.

However, remember that optimizing images is just the beginning. Maintaining optimal site performance is crucial for sustained growth in eCommerce, and if you're facing challenges beyond simple image optimization, you might need a more comprehensive solution. Consider Nostra, our product suite drastically reduces latency, enhances page performance, and optimizes Core Web Vitals. With Nostra, we streamline your website optimization, freeing up your time to focus on broader business objectives. Ready to take your site’s performance to the next level? Explore how Nostra can help, book a demo today.

Related Blogs:

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Discover How Speed is Key to Conversions

Over a hundred DTC companies already trust Nostra to deliver blazing speed and converted customers