Interesting, when I tried a while back it broke all images (not visible on the website due to service worker caching but visible if you put any pictrs url into postman or something)
Interesting, when I tried a while back it broke all images (not visible on the website due to service worker caching but visible if you put any pictrs url into postman or something)
I wrote a patch for Lemmy a week or so ago if you want to skip the caching: https://github.com/LemmyNet/lemmy/pull/3897
I think deleting images from the pictrs storage can corrupt the pictrs sled db so I would not advise it, you should go via the purge endpoint on the pictrs API.
Just a note that my PR there doesn’t disable pictrs for your own instance’s users. It just disables the caching of remote content.
The Lemmy instance I’m speaking from right now is running in my k8s cluster.
I ran this query:
select distinct thumbnail_url as url from post where not local and thumbnail_url like 'https://campfyre.nickwebster.dev/pictrs%'
(replace with your instance’s url)
I then sent delete requests to /internal/purge on pictrs to delete all of those old thumbnails, which cleared out a lot of space. After deleting the thumbnails I ran an UPDATE
query to set all of those old thumbnail URLs to null
in the DB. I also patched the version of lemmy that I run to stop caching thumbnails in the future. Hope this helps!
True, you’re correct. I’m just not sure how you did it without corrupting the sled db. Maybe I’m just unlucky