this post was submitted on 24 Jun 2024
1 points (100.0% liked)

Comradeship // Freechat

2168 readers
15 users here now

Talk about whatever, respecting the rules established by Lemmygrad. Failing to comply with the rules will grant you a few warnings, insisting on breaking them will grant you a beautiful shiny banwall.

A community for comrades to chat and talk about whatever doesn't fit other communities

founded 3 years ago
MODERATORS
 

If you set a URL outside of Lemmygrad as an image, it no longer hotlinks the image.

top 9 comments
sorted by: hot top controversial new old
[–] [email protected] 0 points 4 months ago

I'm guessing as a security measure, so people can't send your browser to a random site via a link.

[–] [email protected] 0 points 4 months ago (2 children)

Can you explain more? Like what it is you are doing, what you expect to happen and what actually happens?

[–] [email protected] 0 points 4 months ago (1 children)

UPDATE: Lemmygrad no longer renders images over HTTP.

[–] [email protected] 0 points 4 months ago (1 children)

It's probably a privacy respecting measure from the recent update. If lemmy hotlinks images or anything in general, there is a chance that your IP is leaked to the server being hotlinked to.

Now images are proxied through the lemmy instance.

[–] [email protected] 0 points 4 months ago (1 children)

works for me with unprotected links (shitflare, etc links not so much)

a 404 in this case probably indicates the proxy is being blocked by the content server itself. can't blame lemmy for that.

[–] [email protected] 0 points 4 months ago (1 children)

I think maybe it doesn't work on embedded images in posts and comments yet. But I've not been following lemmy development closely so don't take my word for it.

[–] [email protected] 0 points 4 months ago (1 children)

Does the image load in my previous comment? That's a markdown url link. I tried it with an image from a cloudflared website, one from reuters.com and one from antiwar.com and only the unprotected antiwar.com image would load.

I've never looked at the lemmy code, but if I had to wager an irresponsibly wild guess... there's probably a curl request in there and the useragent is getting blocked by some CDNs.

[–] [email protected] 0 points 4 months ago* (last edited 4 months ago)

I don't think it's that. Like this image from Reuters served by Cloudflare works:

On the other hand if you try to embed an image served on Reuter's /resizer/ endpoint it won't work embedded since they have some authentication process for it.

I don't think embedded images are being proxied through Lemmy. It's likely the browser trying to fetch the images directly which fails in some cases.

Edit:

Does the image load in my previous comment?

Yeah it does.

[–] [email protected] 0 points 4 months ago

Example: https://lemmygrad.ml/post/4914152

Expected outcome: Lemmygrad hotlinks the image, shows it on side

Actual outcome: Lemmygrad shows a 404 image