this post was submitted on 31 Jul 2025
9 points (100.0% liked)

Pixelfed

439 readers
1 users here now

The official Pixelfed lemmy community

Project website

founded 1 year ago
MODERATORS
 

TL; DR; PNG resized to 1080 pixels on the short edge.

Just recently started dabbling with Pixelfed, but I couldn't find the best upload settings anywhere in the documentation, bar the 15MB upload limit. The server documentation states a quality percentage to use and boolean switches whether to resize and/or optimize images using aforementioned quality.

Turns out: images are by default resized to fit 1080 pixels on the short edge and are re-encoded using https://image.intervention.io/v2/api/encode set to the server's chosen quality percentage (which usually isn't advertised for instances but is 80 by default). Luckily, PNG is accepted nearly everywhere and its compression is lossless.

Those PNGs are way bigger than actual full resolution WebP's with a quality over 80% for my 24MP RAW exports. Most resized and optimized images tend to be smaller than 1MB, though, whereas the allowed PNG's are just shy of 3MB.

A full-res 24MP test image on 85% quality WebP dives well under that 3MB. Restricting to something more modern say 4K monitor resolution at 85% WebP would be well within current optimized file size ranges of about 1MB from my experiments with Darktable exports.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] Glitterkoe@lemmy.world 2 points 2 days ago (1 children)

Well, from what I understand for admins you have some config keys being PF_OPTIMIZE_IMAGES to toggle the entire optimization pipeline (or accept supported formats as is) and the IMAGE_QUALITY percentage as an integer to tweak the lossy compression for formats that support it.

The image resize to 1080 is even hardcoded in the optimizrtion pipeline. I think I saw a toggle for it on the PHP side, but it seems they only expose the toggling of storage optimization as a whole for admins. The 1080 is currently not exposed as a parameter to set, sadly.

As a creator, I was interested in the maximum possible quality to retain. As PNG is often supported and by design only features lossless compression at best while remaining well under 15MB for a file with common image aspect ratio's, that was the winner in that regard. My uncropped 24MP images then become 3MB-ish.

Other formats tend to be way smaller in filesize due to lossy compression being so effective and most images I checked on Pixelfed are resized&optimized JPEGs well under 1MB (around 600-800KB). That is probably the file format and size you'll encounter most.

My own filesize comparisons were for RAW exports using Darktable for different file formats, qualities and resolutions. The PHP image pipeline used by Pixelfed will probably yield comparable results for the same image.

If I were to advocate new settings, that would be cranking up the resolution to more modern standards (like fitting a 4k monitor) and converting to WebP at some 85% (or sticking with 80%).

It's difficult, though, as that may introduce double-lossy pipelines when converting other lossy formats. That's why I looked into resolution settings first. If you upload an image that is too large, it currently decodes your (maybe lossy) image, resizes that (lossy, probably?) and re-encodes that using the set lossy quality if applicable.

Thus, first order of business: at least publish ideal image sizes.

Second, better quality control. Might involve settings per file format or setting a unified output file format.

that's a good explanation, thank you very much ๐Ÿ‘