lemmy icon indicating copy to clipboard operation
lemmy copied to clipboard

Have federated lemmy servers download images from thumbnail_url (image cache) of fedilink instance, instead of user-submitted image link

Open aeharding opened this issue 1 year ago • 3 comments

Requirements

  • [X] Is this a feature request? For questions or discussions use https://lemmy.ml/c/lemmy_support
  • [X] Did you check to see if this issue already exists?
  • [X] Is this only a feature request? Do not put multiple feature requests in one issue.
  • [X] Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.
  • [X] Do you agree to follow the rules in our Code of Conduct?

Is your proposal related to a problem?

The original image URL may break before all lemmy instances have a chance to cache it. This results in posts with broken images for some users, but not others.

Describe the solution you'd like.

In my observations, the fedilink lemmy server has usually successfully cached the image.

So, have federated lemmy instances use the fedilink lemmy server's post.thumbnail_url to download/cache the image, instead of (or as a fallback to) the post.url image link.

Describe alternatives you've considered.

This behavior could be a fallback, or the default behavior.

Or it could be left the way it is. However, this problem pops up fairly often with flakey image hosts like https://i.ibb.co

Additional context

See user complaint: https://lemmy.world/comment/11176251 (please note that this is not a Voyager-specific issue)

aeharding avatar Jul 14 '24 22:07 aeharding

Can't this be solved by the client?

lullis avatar Jul 16 '24 21:07 lullis

Technically yes, but not without the client making an API request to the arbitrary upstream Lemmy server, per failing post image. (Not great for privacy.)

A backend solution would preserve user privacy, and also work by default on all clients. So if this can be implemented in the backend, I think it should be.

aeharding avatar Jul 16 '24 21:07 aeharding

@aeharding maybe I should move this discussion elsewhere, but would you be interested in having support to some form of proxy server that can resolve image urls?

I'm thinking of adding support to IPFS links on fediverser, which would allow clients to query for an image CID and get it from an independent IPFS server. It would solve the privacy issue and it would provide some relief for media servers.

lullis avatar Jul 17 '24 17:07 lullis