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

image_tag helper in MJML template #82

Closed
victordarras opened this issue Apr 13, 2021 · 2 comments
Closed

image_tag helper in MJML template #82

victordarras opened this issue Apr 13, 2021 · 2 comments

Comments

@victordarras
Copy link

Hi,
I'd like to use a standard rails image_tag in my template, but MJML seems to ignore it, am I doing it wrong ?

<mjml>
  <mj-body>
    <mj-section >
      <mj-column>
        <%= image_tag('logo_colored_horiz.png', width: "120" ) %>
      </mj-column>
    </mj-section>
  </mj-body>
</mjml>
@victordarras
Copy link
Author

Nevermind, I found another solution that work perfectly with :

<mj-image src="<%= image_url('logo_colored_horiz.png') %>" width="120">

@sighmon
Copy link
Owner

sighmon commented Apr 15, 2021

@victordarras Nice one, that's how I call images and other assets too.

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

No branches or pull requests

2 participants