Skip to content

Commit

Permalink
Reduce + recode images to JPEG if they are too huge (#3956)
Browse files Browse the repository at this point in the history
I.e. > 500K for the balanced media quality and 130K for the worse one. This can remove animation and
transparency from PNG/WebP, but then a user always can send an image as a file.

Also don't reduce wide/high images if they aren't huge. Among other benefits, this way most of PNG
screenshots aren't touched.

Also remove Exif from all images, not from JPEGs only.
  • Loading branch information
iequidoo committed Mar 11, 2023
1 parent 3c7a285 commit 51da9ed
Show file tree
Hide file tree
Showing 6 changed files with 177 additions and 136 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

### Changes
- Drop unused SQL columns #4141
- Remove metadata from avatars and JPEG images before sending #4037
- Reduce + recode images to JPEG if they are > 500K in size #4037


## 1.111.0
Expand All @@ -14,7 +16,6 @@
- Run `cargo-deny` in CI. #4101
- Check provider database with CI. #4099
- Switch to DEFERRED transactions #4100
- Remove metadata from avatars and JPEG images before sending #4037

### Fixes
- Do not block async task executor while decrypting the messages. #4079
Expand Down
Loading

0 comments on commit 51da9ed

Please sign in to comment.