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

Images overflow on email forward #583

Closed
aksanoble opened this issue Nov 12, 2021 · 12 comments
Closed

Images overflow on email forward #583

aksanoble opened this issue Nov 12, 2021 · 12 comments
Labels
bug Something isn't working

Comments

@aksanoble
Copy link

Version:

  • listmonk: 2.0

Description of the bug and steps to reproduce:
Images overflow when the email get's forwarded. I believe this is due to the headers getting stripped on forward. I'm currently using this tool to convert styles to inline as a way around. https://templates.mailchimp.com/resources/inline-css/

Screenshots:
Screenshot 2021-11-12 at 3 37 07 PM

@aksanoble aksanoble added the bug Something isn't working label Nov 12, 2021
@Mattifyed
Copy link

You are right. This is because the headers are stripped off. However, this behaviour isn't consistent across email clients. All of them behave differently, and the difference is significant. The approach of inlining the HTML before sending, as you do now, seems to be the only solution to this and nothing else really works.

@aksanoble
Copy link
Author

I'm wondering if the css can be made inline during the process where the template is being processed with the email content?

@NicoHood
Copy link
Contributor

That has already been reported and fixed. #548

@knadh knadh closed this as completed Nov 18, 2021
@aksanoble
Copy link
Author

@NicoHood The issue that I am reporting here is different from the #548 . It's related to the headers getting stripped by certain email clients. Wondering if styles can be applied inline while processing email templates. This will save tons of time. https://templates.mailchimp.com/resources/inline-css/

@NicoHood
Copy link
Contributor

And which email client does that??

@aksanoble
Copy link
Author

For example: gmail-web

@knadh
Copy link
Owner

knadh commented Nov 22, 2021

@aksanoble Can you share screenshots describing the issue? Gmail does not strip of layer/table/image styles.

@aksanoble
Copy link
Author

aksanoble commented Nov 22, 2021

@knadh
Here's a screenshot of the original email as received.
Screenshot 2021-11-22 at 6 08 54 PM

Here's how the image looks as we try to forward the email.
Screenshot 2021-11-22 at 6 05 52 PM

@knadh
Copy link
Owner

knadh commented Nov 22, 2021

hm, I'm not sure how listmonk can fix this. You could click the HTML <> icon on TinyMCE toolbar to get the HTML view and add an inline style to the image.

To make it simpler, maybe adding a width % option to the image popup would help? But then again, to get fine grained control (max-width, max-height) on inline styles, it's just simpler to edit the HTML.

image

@aksanoble
Copy link
Author

Can it be done in the step where the content for a particular campaign gets added to the template to generate the final html?

@knadh
Copy link
Owner

knadh commented Nov 23, 2021

I don't think it can be. Different e-mails will treat images differently, right? width, height, max-width, max-height, percentages, pixels ... It has to be designed manually.

@NicoHood
Copy link
Contributor

Don't we need to parse the final html and replace the css with inline styles? Like using a converter lib that removes all those styles and inlines them? I am not sure if that is a common usecase, but at least a solution. I am a bit shocked, that such limited mailclients exist.

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

4 participants