I import image into my project, and when I check the network tab on browser it still shows it bringing in and using the png resource and not the webp resource. I tested to make sure it wasn't a browser issue allowing webp, so I just used this right below the Image import:
I brought in this library, and I guess I might be missing something, or I can't get the expected behavior to work.
I import image into my project, and when I check the network tab on browser it still shows it bringing in and using the png resource and not the webp resource. I tested to make sure it wasn't a browser issue allowing webp, so I just used this right below the
Image
import:<img style={{width: '100%', height: 500, objectFit: 'cover'}} src={require("../../../src/assets/images/banner2.webp")}/>
and that brings in the WebP image as expected. So I know WebP works on the browser.
Any guidance or help would be appreciated!