You can upload an avatar as a PNG, GIF, or JPG image up to 2MB in size. This image will be downscaled to 400x400.
You can upload a header as a PNG, GIF, or JPG image up to 2MB in size. This image will be downscaled to 1500x500.
Bug reproduced on Ice Cubes version 1.10.42 on iOS 17.5.1
Fix
Update the compression method by given a maxSize, maxHeight and maxWidth parameters.
Apply a factor to resize the image and maintain the initial ratio using the new maxHeight and maxWidth parameters.
Optimize the compression method by decreasing the compression factor to achieve the desired maximum size.
Configure the compression settings correctly for the avatar and header images according to the Mastodon documentation.
Bug fix
Description
Unable to update the avatar or header account image. The API request fails with the following error code: 422 Unprocessable Entity.
"error": "Validation failed: Avatar must be less than 2 MB, Avatar file size must be less than 2 MB"
According to the Mastodon documentation:
Bug reproduced on Ice Cubes version 1.10.42 on iOS 17.5.1
Fix
maxSize
,maxHeight
andmaxWidth
parameters.maxHeight
andmaxWidth
parameters.Tests
Only tested on iOS.