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

Support css background-image attributes with cid: on mail preview #51656

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

le0pard
Copy link
Contributor

@le0pard le0pard commented Apr 24, 2024

Motivation / Background

Mail preview support show inline attachments for <img> tag, but have not support for background-image css attribute. But this is also valid way to use inline images in emails. More info: https://email2go.io/blog/how-to-use-background-images-in-email-templates

Example of usage in erb template:

<td style="width: 100%; background-image: url(<%= attachments['welcome-email-bg.png'].url %>)">

without this fix:

Screenshot 2024-04-24 at 15 44 26

with this fix:

Screenshot 2024-04-24 at 15 43 21

Did not found tests for InlinePreviewInterceptor, so if I am missed add test cases, please point me where to add its

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

Successfully merging this pull request may close these issues.

None yet

1 participant