I have opted to host all of my images for a site on IPFS, they are pinned fine. This reduces traffic and costs from my hosting provider to within the free tier.
Sometimes the IPFS url does not load fast enough, as it depends on where the user is, and CDNs that claim to cache IPFS results have not been working for me (they don't find my hash to cache)
So I wanted an alternative, I wanted to allow for some latency of loading the image from IPFS and then fallback to loading the image directly from my server.
It's not just images, but basically it seems as if the src tags from a variety of resources should be conditionally filled in. Or perhaps a preloading script could try to load the resources and then timeout and load them in. I don't want these resources downloaded from my server unless absolutely necessary, for this application and audience optimizing the theoretical loading speed of the site isn't that important. Ideally I can do all of this in the frontend code. Has anyone loaded resources from mirrors, conditionally?