status-desktop icon indicating copy to clipboard operation
status-desktop copied to clipboard

Enable support for larger images and audio messages (increase max size setting)

Open John-44 opened this issue 1 year ago • 4 comments

Edit

The chunking part is done. See this comment: https://github.com/status-im/status-desktop/issues/9923#issuecomment-2009389837

The missing part is increasing the Max size for binaries.

Problem:

  • Waku isn't designed to send large messages

  • libp2p (which Waku is built on top of) is in the process of being optimised by ProtocolLabs and others for messages up to 125kb in size, as part of the work to implement Ethereum's DankSharding (EIP-4844)

  • Users expect good quality images in a messaging app, but Status currently has a 300kb image size limit, and images that user's post are recompressed to fit inside this size limit (which means that large images currently look rubbish in Status).

  • It would be nice to raise the length limit for audio messages in the future

  • We would like to allow users to share small files (e.g. up to 2mb) in the future

  • The community web onboarding screens (the screen a user who doesn't have Status installed arrives on when they open a community URL that has been sent to them in a browser) requires communities to use a large high quality image as their banner (see example screen below) 2023-03-16 13_44_23-Sharing for Mobile – Figma

Solution

  • Add support to status-go to split binary files that are larger than 125kb into several waku messages, each with a 125kb payload. Then at the recipient's end, reconstruct the binary from these multiple waku messages.

  • Increase the max size limit for each image sent in a message to 1.5mb. If an image is less than 1.5mb it should not be recompressed. If an image is larger than 1.5mb it should be recompressed to 1.5mb using the recompression functionality that is already in status-go today.

  • Increase the max size of audio messages to 1.5mb (e.g. at it's largest size, it would be split into twelve 125kb waku messages)

  • Increase the max size of community banner images to 2.5mb (e.g. at it's largest size, it would be split into twenty 125kb waku messages)

  • Set the max size of a community logo image as 250kb (e.g. at it's largest size, it would be split into two 125kb waku messages)

  • Set the max size of a user avatar image as 125kb (e.g. at it's largest size, it would be split into two 125kb waku messages)

Other notes

  • This feature should be worked on by the Desktop team (not the Mobile team, because the Mobile has more work to do to get to MVP)

  • The desktop team shouldn't work on this feature until after the 0.13 release

  • Before starting work on this feature, whoever is going to implement it should speak to both @cammellos (because this is an approach that @cammellos has already been thinking about) and @felicio (because @felicio will need to add support for this into status.js)

cc'ing @iurimatias

John-44 avatar Mar 16 '23 13:03 John-44