question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hero Image not rendering on Outlook 2016

See original GitHub issue

<mj-hero> is not rendering in Outlook 2016 on PC desktop. It looks good on all other platforms/clients.

<mjml>

  <mj-head>

    <mj-attributes>
      <mj-text align="left" color="#fff" font-size="15px" line-height="1.5" font-family="roboto"/>
      <mj-section background-color="#373737" />
    </mj-attributes>

  </mj-head>

  <mj-body background-color="#e4e4e4">
    <mj-section background-color="#e4e4e4">
    <mj-column width="30%" vertical-align="middle">
      <mj-image align="center" href="#" align="left" src="#" />
    </mj-column>
    <mj-column width="70%" vertical-align="middle">
      <mj-text font-family="arial" align="center" color="#373737"><p style="font-size:10px;">UNIVERSITY OF MARS | FEB 2019</p></mj-text>
    </mj-column>
      </mj-section>


      <mj-hero mode="fixed-height"
                height="469px"
                background-width="450"
                background-height="469px"
                background-url="https://www.fireflyorthoses.com/wp-content/uploads/37.png">

        <mj-text padding-top="40%"
                 font-size="45px"
                 line-height="1"
                 align="center"
                 padding-top="70px"
                  font-weight="900"><a style="text-shadow:3px 3px #838383; font-family:brandon grotesque; letter-spacing:3;">KEEP IN TOUCH</a></mj-text>



              <mj-button padding-top="2%"
                         background-color="#fff"
                         color="#fb4f14"
                         inner-padding="10px"
                         font-size="19px"
                         href="www.google.ie" align="center">
                JOIN THE MAILING LIST
              </mj-button>


      </mj-hero>
    <mj-section>
    <mj-column width="80%">
      <mj-image width="200%" padding-top="10%" src="https://www.google.com/url?sa=i&source=images&cd=&cad=rja&uact=8&ved=2ahUKEwjh-Kfx1szgAhUNQxUIHS5HCBQQjRx6BAgBEAU&url=https%3A%2F%2Fpngimage.net%2Flogo-placeholder-png-4%2F&psig=AOvVaw1Zio4OabCYKE56Tis3NQdu&ust=1550833285664519" />
      <mj-text>
        <p>Hi [firstname, fallback=there]</p>
 



                  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.  </p>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </p>

            <p>Best Wishes,</p>

      <p align="left">John | Company </p>
      </mj-text>

      </mj-column>

      </mj-section>

  <mj-section background-color="#e4e4e4">
    <mj-column width="80%">
      <mj-text align="left"><p style="font-size:13px; color:#808080;">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut.</p> </mj-text>
    </mj-column>
    </mj-section>


               <mj-section background-color="#e4e4e4" padding="0 0 0 0">
        <mj-column>
          <mj-text align="center" color="grey">
            COMPANY NAME
          </mj-text>

        </mj-column>
      </mj-section>

    


     <mj-section background-color="#e4e4e4">
        <mj-column>
          <mj-text align=center color="grey" font-size="13">
            <preferences>subscription preferences</preferences> &nbsp;|&nbsp; <unsubscribe> unsubscribe</unsubscribe>
          </mj-text>
        </mj-column>
      </mj-section>


  </mj-body>
</mjml>

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Create a file with this MJML code: <mjml>...</mjml>
  2. Render it to HTML by doing ‘…’
  3. Send the HTML to an email address with ‘…’
  4. See error

Expected behavior The email is rendering correctly on webclients, including outlook’s webclient, but not on Outlook 2016 on desktop.

MJML environment (please complete the following information):

  • OS:
  • MJML Version 4.0.0
  • MJML tool used - MJML App]

Email sending environment(for rendering issues):

  • Campaign Monitor

Affected email clients (for rendering issues):

  • Email Client Outlook
  • OS: Windows

Screenshots outlook2016

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
crashworxcommented, Jun 23, 2019

I can reproduce this issue as well i get a background image that doesn’t render. I’m using the online live editor.

Looks find in everything except Outlook 2016.

Here is the mjml’ <mj-hero background-color="#f1f2f5" background-url="https://www.abcdefg.com/img-email/banner-help.png" padding="20px" background-height="220px"> and here is the output HTML.

<!--[if mso | IE]>
      </td>
    </tr>
  </table>
  
    <table
       align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:600px;" width="600"
    >
      <tr>
        <td  style="line-height:0;font-size:0;mso-line-height-rule:exactly;">
          <v:image
             style="border:0;height:220px;mso-position-horizontal:center;position:absolute;top:0;width:0px;z-index:-3;" src="https://www.abcdefg.com/img-email/banner-help.png" xmlns:v="urn:schemas-microsoft-com:vml"
          />
  <![endif]-->
<div style="margin:0 auto;max-width:600px;">
  <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;">
    <tr style="vertical-align:top;">
      <td background="https://www.abcdefg.com/img-email/banner-help.png" style="background:#f1f2f5 url(https://www.abcdefg.com/img-email/banner-help.png) no-repeat center center / cover;background-position:center center;background-repeat:no-repeat;padding:20px;vertical-align:top;"
        height="-40">
        <!--[if mso | IE]>
    <table
       border="0" cellpadding="0" cellspacing="0" style="width:600px;" width="600"
    >
      <tr>
        <td  style="">
  <![endif]-->

Any help would be greatly appreciated!

1reaction
iRyusacommented, Feb 21, 2019

As you’re sending through campaign monitor, try send it with putsmail.com it might be campaign monitor altering the HTML

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hero image rendering incorrectly in outlook - Marketing Nation
Hello Community,. Email is created and ready to send so I forwarded a sample to my boss... Unfortunately the hero image is being...
Read more >
A Fix for Outlook Image Issues in HTML Email Campaigns
On it's own, this does not fix the exploding image problem. Problem 2: Exploding Image Size. We ended up calling the full image...
Read more >
Outlook Email Rendering Issues and How to Solve Them
How to solve Outlook email rendering issues: the do's and don'ts · Do include width and height attributes on your images · Do...
Read more >
HTM Email background image not displaying on outlook
You've removed the height from the original code. I'm guessing that was for responsiveness, but the VML will only show up on Outlook...
Read more >
My background image isn't showing up. Can someone help?
START HERO --> <table style="background-image: ... on Apr 26, 2016 ... /16441034/background-images-not-working-in-outlook-2007-and-later.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found