Skip to content

Downsample images before uploading them #2749

@borisyankov

Description

@borisyankov

If an image uploaded to the server is larger than some predetermined dimensions, downsample to that size. (we might want to offer an option to not downsample)

Considerations:

  • Instagram uses 1024x1024 images. This seems to work quite well in the majority of cases.
  • Phone pictures and screenshots can be 10-20x as big in pixel count / byte zie.
  • We can dramatically reduce upload and download speeds in most cases if we reduce size and increase compression levels
  • Our downsampling client-side should be more conservative (it is permanent per upload) than the thumbnailing on the server-side

We might experiment with 2048x2048 limit for client-side and 1024x1024 limit server-side (both configurable)

In this thread:
https://chat.zulip.org/#narrow/stream/9-issues/topic/IOS.20app.20emoji.20cutoff

I have demonstrated a 1.46mb mobile screen-shot still being very legible downsampled to 20kb.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-compose/sendCompose box, autocomplete, camera/upload, outbox, sending

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions