Notification texts go here Contact Us Buy Now!

Why is my NextJS Image component not converting images to webp?

If your NextJS Image component is not converting images to webp, there are a few possible reasons:

1. You have not added the following config to your next.config.js file:


  images: {
    domains: ['http://localhost:3000'],
  },

This config tells NextJS to allow image optimization for images from the specified domains.

2. You have added unoptimied: true to your next.config file:


  images: {
    unoptimized: true,
  },

This config tells NextJS to not optimize images, which will prevent them from being converted to webp.

3. You are using an old version of NextJS:

Image optimization was introduced in NextJS 9.3.0, so if you are using an older version, you will need to update to the latest version to take advantage of this feature.

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.