Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pasted items do not render in original dimensions #678

Closed
BiglifeMatt opened this issue Nov 15, 2022 · 7 comments
Closed

Pasted items do not render in original dimensions #678

BiglifeMatt opened this issue Nov 15, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@BiglifeMatt
Copy link

Describe the bug
Images that are copied and pasted, or dragged into the email body or even email signature from another email app, such as Gmail, can distort when they are opened by Snappymail.

Images that are pasted or dragged into Snappymail to be sent, it will insert the image at full resolution.

If a selection of a spreadsheet is hightlighted and copied and pasted into another app like Gmail, then opened by Snappymail, the pasted selection displays as a single pixel vertical line for the length of the pasted selection.

Expected behavior
A fixed resolution image of pasted objects.

Please complete the following information:

  • Browser: Chrome, Edge, Brave
  • IMAP daemon: dovecot (iRedMail)
  • PHP version: 7.4
  • SnappyMail Version: 2.21.2
@the-djmaze
Copy link
Owner

Scaling images can be added, but how?

  1. Should it resize the image so that you don't send 20MiB email?
  2. Should it just set width/height and send 20MiB email?
  3. Should it compress the .svg to .svgz?

Spreadsheets:
Each application generates HTML in its own way.
LibreOffice, Microsoft Excel, Office365, Gsuite, etc. etc.
How should SnappyMail fix them so that it is also properly visible on small devices like mobile phones?

Not to mention the differences how each browser handles copy/paste.
Some copy raw, some integrate the whole CSS style in the style="" attribute.

The web is a mess, so please provide examples what you exactly copy, from where and the result HTML.

Else i just shoot in the dark.

@BiglifeMatt
Copy link
Author

Let's start with the image in the body. I'll attach three images here.

The first is an image that is 1080x1440.

This is it when it is pasted into Gmail to send to dovecot server.
Gmail image sent to Snappymail

This is the image of the email opened in Roundcube.
Image sent from Gmail opened in Roundcube

This is the image of the email opened in Snappymail.
Image sent from Gmail opened in Snappymail

This is the image if it is pasted into Snappymail.
Image pasted in Snappymail

@the-djmaze
Copy link
Owner

Ok i will send myself an email with large image from gmail to snappy and see what happens.

Paste image in SnappyMail is indeed as-is because the image is very large.
Some browsers you can click the image and resize it.
Some browsers don't support image resize.
Maybe add a style editor to compose window?

the-djmaze pushed a commit that referenced this issue Nov 15, 2022
@the-djmaze
Copy link
Owner

Works now responsive.
Thanks for finding this issue!

simplescreenrecorder-2022-11-16_00.02.58.mp4

@the-djmaze the-djmaze reopened this Nov 15, 2022
@the-djmaze
Copy link
Owner

@BiglifeMatt
Copy link
Author

BiglifeMatt commented Nov 17, 2022 via email

@the-djmaze
Copy link
Owner

#262 is the request for image resizing

@the-djmaze the-djmaze added the bug Something isn't working label Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants