this post was submitted on 25 Oct 2024
19 points (95.2% liked)
Lemmy
12575 readers
1 users here now
Everything about Lemmy; bugs, gripes, praises, and advocacy.
For discussion about the lemmy.ml instance, go to !meta@lemmy.ml.
founded 4 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
You can make nearly all images small enough to upload and still look good without dropping colour depth. There are 3 ways to achieve it basically:
The resizing is usually enough.
The quality reduction is something that google pagespeed focuses on too. For most apps that means choosing a lower "quality" when converting to jpg or saving as a new jpg. 85% of original is good.
If you happen to have imagemagick installed, I have a little script that I use called "resize_to_pagespeed.sh". The jist of it is this:
I just ran this on a 2.4MB photo (below) and it came out at 186KB. That's a 13x reduction. Right click -> open in new tab to see it full size.
If the image isn't square, imagemagick is smart enough to figure out correct dimensions.
photos will never be pngs unless someone intentionally converts them to that format, as pngs are much worse than jpgs for storing this type of image. pngs are much better for computer generated images, such as screenshots, drawings, etc. you can also losslessly compress pngs with tools like pngcrush without converting them to jpg.