Image style height and width not taken in outlook mails

后端 未结 9 2071
情书的邮戳
情书的邮戳 2020-12-08 01:34

I have a following dom structure in html content I am sending as email.



        
相关标签:
9条回答
  • 2020-12-08 02:08

    This worked for me:

    src="{0}"  width=30 height=30 style="border:0;"
    

    Nothing else has worked so far.

    0 讨论(0)
  • 2020-12-08 02:19

    The px needs to be left off, for some odd reason.

    0 讨论(0)
  • 2020-12-08 02:19

    This works for me in Outlook:

    <img src="image.jpg" width="120" style="display:block;width:100%" />

    I hope it works for you.

    0 讨论(0)
  • 2020-12-08 02:21

    Can confirm that leaving px out from width and height did the trick for Outlook

    <img src="image.png" style="height: 55px;width:139px;border:0;" height="55" width="139">
    
    0 讨论(0)
  • 2020-12-08 02:22

    <img id="_x0000_i1026" src="images/img.jpg" width="120" height="150" />

    This worked for me both in gmail and outlook.

    0 讨论(0)
  • make the image the exact size needed in the email. Windows MSO has a hard time resizing images in different scenarios.

    in the case of using a 1px by 1px transparent png or gif as a spacer, defining the dimensions via width, height, or style attributes will work as expected in the majority of clients, but not windows MSO (of course).

    example use case - you are using a background image and need to position a with a link inside over some part of the background image. Using a 1px by 1px spacer gif/png will only expand so wide (about 30px). You need size the spacer to the exact dimensions.

    0 讨论(0)
提交回复
热议问题