How to change GIFs in an HTML email with a different image for unsupported clients

I have a client who wants me to create an HTML email template for them. They want to include an animated GIF banner image, which is not supported in all email clients. The animation they want will not have a readable first frame, and from my research, email clients that do not display GIF formats will simply display the first frame of GIF. I was wondering if there is a way to replace the image used and use a different image, and not GIF for email clients that do not support GIF formats. Thanks for the help!

+4
source share
2 answers

The easiest way is to create a GIF where the first frame is read, but since this is not an option, you can hack clients that do not support GIF.

Fortunately, GIF support is pretty good, mostly Windows Outlook 2007/2010/2013/2016 , which don't support GIF. Thus, we target this range using Outlook Conditional CSS . Outlook 2007 is version 12 , so something like this should display what we want. (maybe you need to fool, exactly which tags will be nested)

<!--[if gte mso 12]>
<td>
    <img src="fallback.jpg">
</td>
<![endif]-->

<!--[if !gte mso 12]><!-- -->
<td>
    <img src="animated.gif">
</td>
<!--<![endif]-->

Here's a good thread at stack overflow , discussing various ways to target specific versions of Outlook desktop.

+4
source

, . gif, , , , GIF . , gifs . , gif, gif , , , - .

+1

Source: https://habr.com/ru/post/1651821/


All Articles