Skip to content

Reduce network usage composing mails with large inline attachments #13536

Description

@odzhychko

Is your feature request related to a problem? Please describe.

When pasting an image in to a mail we store it in the <img> src attribute as a data URL.

`<img src="data:image/png;base64,iVBO...`
  • Given:
    • Composing HTML mail with large inline attachment
  • When
    • Editing the mail
  • Then
    • A draft is saved continuously (with some denounce)
      - The send draft text is large because data URL is part of the HTML

Describe the solution you'd like

When saving the draft for the first time, upload the inline attachments to the server and replace references to data URLs to the attachment URLs.
And from then on only use the attachment ULRs in the HTML source.

Describe alternatives you've considered

Keeping as is if handling life cycle of separately uploaded inline attachments is not to complicated.
But I assume we already have similar handling for regular attachments there this would only reuse the mechanism we already have in place.

Additional context

Relates with #13535 and might be worth tackling together (or at least with each other in mind), because the implementations would be touch the same code.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions