Skip to main content
Level 6
Feb 17, 2022 10:57 PM UTC
Solved

Best solution to fix image rendering issue in MSO Outlook?

Hello Community,

 

I have added code that appears to have fixed an issue with images appearing cut off or not appearing at all in my desktop MSO 365 Outlook inbox (Version 2201 Build 16.0.14827.20186).

 

 

As you can see, the images have been uploaded in a RTE that is contained in a Module:

 

 

The fix I applied was to add the following code to the <head> section:

 

<!--[if mso]> <style> td, th { line-height: 0px !important; } </style> <![endif]-->

 

 

The images are now rendering perfectly:

 

 

My question is whether there's any chance the code I added to the <head> section could adversely impact anything in the template. I don't believe it would, but I just want to be sure.

 

Thanks for your help!

 

LK

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
SanfordWhiteman
SanfordWhitemanAccepted solution
User Group Leader
Feb 19, 2022 12:02 AM UTC

You can add classes — that’s a better move when you know something works in a <style> to begin with.

4 replies

SanfordWhiteman
User Group Leader
User Group Leader
Feb 17, 2022 11:28 PM UTC

Well, it’ll apply to all table columns and table headers anywhere in the email — only under Outlook, of course, but throughout the entire email. Impossible to say if that’ll break anything, since there’s a chance some other elements don’t expect this style.

Translate
Level 6
Feb 18, 2022 12:05 AM UTC

Thanks Sanford.

 

In that case, would it be better to apply the styling inline like below?

<!--[if mso]> <tr style="line-height:0px !important;"> <td align="center" valign="top" class="em_defaultlink" style="border-collapse: collapse; mso-line-height-rule: exactly; font-family:'Helvetica', Arial, sans-serif;font-size:24px;line-height:0px !important;color:${brand_colors_1};font-weight:bold;"> <![endif]-->

 

Or to perhaps add classes to the code?

 

This is the code for the "header text" where the image is being placed.

<tr> <td align="center" valign="top" class="em_defaultlink" style="border-collapse: collapse; mso-line-height-rule: exactly; font-family:'Helvetica', Arial, sans-serif;font-size:24px;line-height:27px;color:${brand_colors_1};font-weight:bold;"> <div class="mktoText" id="Mod_39_Text" mktoName="Headline Text">Headline Goes Here</div> </td> </tr>

 

Thank you,

LK

 

Translate
SanfordWhiteman
User Group Leader
SanfordWhitemanUser Group LeaderAccepted solution
User Group Leader
Feb 19, 2022 12:02 AM UTC

You can add classes — that’s a better move when you know something works in a <style> to begin with.

Translate