react-image-webp
react-image-webp copied to clipboard
Add support for Server Side Rendering
Hello,
I'm building an App which uses next.js but I cannot make your component to work when using SSR. In Chrome, in the console, I have this:
Warning: Prop `src` did not match. Server: "/static/images/logo.png" Client: "/static/images/logo.webp"
In the end, I'm always returing the fallback image. Could you implement SSR with next.js?
Regards,
Matthieu
Hello @MBach!
Interesting task, i will think about how implement it in next.js in next few days.
Thanks!
Great news! Looking forward to reading from you
Any news?
Hello!
My package react-img-webp supports server-side render using react context. You can pass Accept
header from http request and everything will be rendered. On client-side additional webP support check will be done.