this post was submitted on 24 Oct 2023
2 points (100.0% liked)

WetShaving

690 readers
7 users here now

This is a community of enthusiasts, hobbyists and artisans who enjoy a traditional wet shave: brush, soap, and safety or straight razor. We are a part of the WetShaving community found on Reddit, Discord, and IRC.

New subscribers welcome!

Please visit our wiki, which is always and forever a work in progress.

Our sister Mastodon instance is https://wetshaving.social.

Community Rules

Rule 1 - Behaviour and Etiquette
Rule 2 - Content Guidelines
Rule 3 - Reviews and Disclosure
Rule 4 - Advertising
Rule 5 - Inappropriate Content
Rule 10 - Moderator Discretion

founded 1 year ago
MODERATORS
 

Share your shave of the day!

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 10 months ago (1 children)

Just poked around because I was curious, it does look like the config for pict-rs lets you specify a format to convert things to and a max size/quality: https://git.asonix.dog/asonix/pict-rs/src/branch/main/pict-rs.toml#L237

I'd suggest WebP with a quality of 85 and max dimensions of 3840x3840 (because 4k is 3840x2160).

That takes djundjila's photo for today (a 4236x2677 jpeg) from 1.9Mb down to 360Kb for a 3840x2427 WebP.

You might also consider AVIF as that's widely supported as well and looking like it'll probably become the new standard but for now is a bit CPU intensive until CPUs start adding SIMD for it. Too bad JPEGXL lost momentum, it was kinda better (and less CPU intensive). But if the server doesn't mind chewing on it ...that same SotD as a quality 66 AVIF is just 160Kb, eg. less than a tenth the size.

For more info about quality settings: https://www.industrialempathy.com/posts/avif-webp-quality-settings/

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

Nice, I'll look into this stuff. Pretty cool.

The weird part is I downloaded a photo that had been uploaded here, and re-uploaded it as the icon/banner (it doesn't let you use a URL for the icon/banner). So that picture exists multiple times in our storage. It also crashed pict-rs, which in turn doesn't let Lemmy boot. Initially my browser downloaded a .webp, but I changed the URL in order to download it in .jpg. I don't have a good program that can edit .webp. So, maybe the problem was that I saved it as a .jpg, when it fact it was a .webp? The banner worked just fine, so I'm not sure. I only cropped the banner image, whereas I resized the icon.

[–] [email protected] 2 points 10 months ago

Sorry, I just peeked at the config options and have never run any of this so no idea about the interaction with Lemmy or how to troubleshoot that. What I'd do though is spin up a toy instance on another subdomain/locally in a container and try to reproduce it there. Maybe with a copy of the data from production if that's easy enough to pull off.

But ya only in retrospect - I wouldn't have expected changing the banner or icon to be a risky operation.