lemmy icon indicating copy to clipboard operation
lemmy copied to clipboard

Always save remote image data

Open sunaurus opened this issue 1 year ago • 0 comments

#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.

sunaurus avatar Jun 28 '24 19:06 sunaurus