this post was submitted on 19 Sep 2022
14 points (100.0% liked)
Lemmy Support
4753 readers
4 users here now
Support / questions about Lemmy.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
pict-rs doesn't keep track of how often it serves different images, so there's not a good metric for pruning old images. That said, 0.4 will introduce functionality for cleaning up processed images (e.g. resizes/thumbnails), removing their files & metadata. If they are viewed again, they will be re-generated.
0.4 will also include the ability to scale down images on upload, rather than storing the original resolution. This is not yet implemented, but it's on my roadmap.
All this said, it is already possible to use pict-rs with object storage (s3-compatible), rather than block storage. That's a good option if your hosting provider offers it
Is deduplication supported by re-using images already in storage if newly upload images share the same hash with them?
Yes. It uses sha256 rather than perceptual hashing, but that's Good Enough™️
Why not SHA-512 or SHA3?
I chose it at the start of the project 🤷
Maybe is it worthy to make a smooth change to this in the future? https://en.wikipedia.org/wiki/SHA-3#Comparison_of_SHA_functions