Timeout for image loads
Sometimes (when using the random feature) the loading wont stop. I suppose the PHP application is waiting for IPFS. At least when the random feature is used, I think it would make sense to have a shorter timeout. There doesn't seem to be any timeout builtin the ipfs command line client, so the easiest way to implement this right now would probably be in the curl-request.
I have added a five seconds limit in the new php ipfs wrapper. I'm not sure if that's too short or too long. There might be a delay if ipfs.pics needs to fetch images on another computer. I am thinking about redirecting to a page that will refresh a few seconds later in those cases.
What is your opinion on this?
5 seconds sounds OK, I'm not sure how fast the network is in general. Sounds like a good idea to show a loading-message of some sort after 5 seconds, and then refresh a few times to see if IPFS has managed to load the image.
Maybe we could use this to check if the object is available locally?