16
submitted 2 years ago* (last edited 2 years ago) by bjoern_tantau@swg-empire.de to c/lemmy_support@lemmy.ml

By default Lemmy seems to be mirroring every link's preview image. Even when that link was originally posted on an external Lemmy instance. That can put quite a strain on small servers. Is there a way to disable this? Ideally I would have pict-rs just be used to host the images my users upload and nothing else.

Solved:

Add

  pictrs: {
    image_mode: "None"
  }

to lemmy.hjson.

top 10 comments
sorted by: hot top new old
[-] Die4Ever@programming.dev 7 points 2 years ago
[-] bjoern_tantau@swg-empire.de 3 points 2 years ago

Great! Thanks!

Now I just have to somehow prune the old images...

[-] Die4Ever@programming.dev 3 points 2 years ago

I think there's a guide for that somewhere? Maybe I can try looking for it tomorrow if no one else finds it first. I think the admin control panel that shows uploaded images might also show the federated ones?

[-] bjoern_tantau@swg-empire.de 2 points 2 years ago

Maybe pictrs does it by itself. It's still working like crazy after I did the change without any user-uploads happening.

[-] Die4Ever@programming.dev 1 points 2 years ago* (last edited 2 years ago)

this might help https://monero.town/post/2020876

I guess you could call GET /internal/hashes?{query} to see all the images

[-] kat@orbi.camp 1 points 2 years ago

is the default thumbnails?

[-] Die4Ever@programming.dev 2 points 2 years ago

the default appears to be StoreLinkPreviews in v0.19.8

https://github.com/LemmyNet/lemmy/blob/0.19.8/crates/utils/src/settings/structs.rs#L85-L88

but in the main branch it's ProxyAllImages, so I guess that'll be for a future release

https://github.com/LemmyNet/lemmy/blob/main/crates/utils/src/settings/structs.rs#L74-L77

[-] Blaze@lemmy.dbzer0.com 5 points 2 years ago

There was a post on !fedigrow@lemm.ee recently about pictures management, maybe that can help

[-] bjoern_tantau@swg-empire.de 2 points 2 years ago

For anyone curious, I think that is the post: https://lemm.ee/post/53212164

[-] Blaze@lemmy.dbzer0.com 3 points 2 years ago

Indeed, thanks!

this post was submitted on 01 Feb 2025
16 points (94.4% liked)

Lemmy Support

5096 readers
1 users here now

Support / questions about Lemmy.

Matrix Space: #lemmy-space

founded 7 years ago
MODERATORS