Handle ALL images not found on your website automatically with ease!
-
Updated
Nov 9, 2022 - JavaScript
Handle ALL images not found on your website automatically with ease!
Fallback for broken images (Service Workers)
Demonstrates and fixes the well-known SSR bug in React and Next.js where <img onError={...}> fails to trigger for broken image URLs. Includes working demos using Client Components and server-side HEAD checks for SEO-safe image fallback rendering.
🐙 Documents the Next.js SSR onError image fallback bug in React, where broken <img> tags do not fire onError during server-side rendering. References for fixes.
Add a description, image, and links to the image-fallback topic page so that developers can more easily learn about it.
To associate your repository with the image-fallback topic, visit your repo's landing page and select "manage topics."