4704 made saving data into the remote_image table conditional on a successful image proxying request.
In practice, I have found that the first image proxy requests quite often don't finish before the default request timeout (happens as often as every 2 out of 10 images on lemm.ee). Even after increasing the default timeout to 60 seconds, I still see occasional broken images.
Currently in the main branch, a failed initial proxy attempt means that the image will be broken forever, because subsequent requests will never succeed if the image URL is missing from the remote_image table. This PR proposes always saving data into remote_image before even trying to proxy it for the first time, that way, even if the first proxy attempt fails, subsequent ones can still succeed.
4704 made saving data into the
remote_image
table conditional on a successful image proxying request.In practice, I have found that the first image proxy requests quite often don't finish before the default request timeout (happens as often as every 2 out of 10 images on lemm.ee). Even after increasing the default timeout to 60 seconds, I still see occasional broken images.
Currently in the
main
branch, a failed initial proxy attempt means that the image will be broken forever, because subsequent requests will never succeed if the image URL is missing from theremote_image
table. This PR proposes always saving data intoremote_image
before even trying to proxy it for the first time, that way, even if the first proxy attempt fails, subsequent ones can still succeed.