Resize avatars before sending to Discord #76

Closed
opened 2026-03-03 12:15:12 +00:00 by cadence · 3 comments
Owner
  • Find a commonly used scale size for crop
  • Add/modify image endpoint to accept resizing (match to what the Matrix API is passed)
  • Modify event-to-message.js to get a link to the resized avatar
- Find a commonly used scale size for `crop` - Add/modify image endpoint to accept resizing (match to what the Matrix API is passed) - Modify event-to-message.js to get a link to the resized avatar
Author
Owner

In crop mode there are not many common usages at large enough sizes needed for Discord on a 2x pixel density display. For scale mode a common size (the third most common, in fact) is >=240x240, which is sufficient. This also works well with Synapse's default thumbnail_sizes configuration. So I will scale profile pictures to >=240x240 for Discord.

In `crop` mode there are not many common usages at large enough sizes needed for Discord on a 2x pixel density display. For `scale` mode a common size (the third most common, in fact) is >=240x240, which is sufficient. This also works well with [Synapse's default `thumbnail_sizes` configuration](https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html#thumbnail_sizes). So I will `scale` profile pictures to >=240x240 for Discord.
Author
Owner

JK, have to do it client side because server side is too slow.

JK, have to do it client side because server side is too slow.
Author
Owner

Done in aecfde54c8

Done in aecfde54c88d5f300ce64dde1f28ab1b3efe5235
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cadence/out-of-your-element#76
No description provided.