lemmy-ui icon indicating copy to clipboard operation
lemmy-ui copied to clipboard

[Bug]: Lemmy UI URL used in image posts instead of Lemmy URL

Open Fmstrat opened this issue 11 months ago • 4 comments

Requirements

  • [x] Is this a bug report? 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 single bug? Do not put multiple bugs in one issue.
  • [x] Do you agree to follow the rules in our Code of Conduct?
  • [x] Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.

Summary

First off, I assume this is related to the backend selection and delivery of the URL in the ActivityPub Note, even though it's about URL usage. If I should move this issue, please let me know.

When posting an image via Lemmy UI, the federated URL used with that image is the Lemmy UI URL and not the Lemmy URL. This isn't usually an issue, since they are normally hosted at the same URL, but for my instance, that is not the case. My Lemmy UI is private, and my Lemmy backend is public.

Specifically, I am talking about the italic programming.dev below:

Image

This is also a link to a non-accessible resource, because it's using the wrong URL.

Steps to Reproduce

  1. Run Lemmy Backend at lemmy.domain.com
  2. Run Lemmy UI at lemmy-ui.domain.com
  3. Post an image from Lemmy UI to a community on lemmy.other-domain.com
  4. Visit the post on lemmy.other-domain.com
  5. Underneath the image will be a display of italic lemmy-ui.domain.com with a broken link of https://lemmy-ui.domain.com/pictrs/image/<uuid>.png instead of lemmy.domain.com with a working link of https://lemmy.domain.com/pictrs/image/<uuid>.png

Technical Details

n/a

Version

BE: 0.19.3

Lemmy Instance URL

lemmy.nowsci.com

Fmstrat avatar Jan 31 '25 23:01 Fmstrat

I'm pretty sure this is a lemmy-ui issue, but just to make sure could you try posting from a mobile app or something like https://phtn.app and see if it happens there as well?

flamingos-cant avatar Feb 01 '25 09:02 flamingos-cant

Which exact field of the api response do you mean? You can see it in browser dev tools.

Nutomic avatar Feb 04 '25 11:02 Nutomic

@flamingo-cant-draw I believe you are correct. I drafted a post in Thunder and my server returns the backend URL for the image there. Is there a recommended way to move this issue over, or should I just duplicate it?

Fmstrat avatar Feb 04 '25 12:02 Fmstrat

I moved it.

Nutomic avatar Feb 04 '25 12:02 Nutomic