Add dark mode to your website with 3 easy steps using CSS. Adding prefers-color-scheme is easy, although there are fine details to solve for.
Displaying broken images with the service worker
Using the service worker, the fetch event can tell if and when an image is not properly loaded, after which we can fetch a new placeholder image.