{"id":1208,"date":"2021-10-31T02:55:06","date_gmt":"2021-10-31T02:55:06","guid":{"rendered":"https:\/\/lite16.com\/blog\/?p=1208"},"modified":"2022-06-17T09:24:54","modified_gmt":"2022-06-17T09:24:54","slug":"how-to-stop-gmails-image-download-button-from-appearing-in-html-emails","status":"publish","type":"post","link":"https:\/\/lite16.com\/blog\/2021\/10\/31\/how-to-stop-gmails-image-download-button-from-appearing-in-html-emails\/","title":{"rendered":"How to Stop Gmail&#8217;s Image Download Button from Appearing in HTML Emails"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/cdn.mos.cms.futurecdn.net\/pKRkkR7LuqnP2tZbZLDMec-1200-80.jpg\" alt=\"See the source image\" \/><\/p>\n<p>It&#8217;s a tiny arrow in the right-hand corner of images. If you&#8217;re an email marketer who strives for email perfection, you&#8217;ll want to disable the Gmail image download button.<\/p>\n<p>It was first noticed in 2014, and some thought it was a Gmail webmail bug that would be quickly fixed. Years later, the Gmail image download button still exists.<\/p>\n<p>It turns out it&#8217;s a feature that works well for personal emails.<\/p>\n<p>Let&#8217;s say your mother sends you a photo from the family reunion. Or your pals send you a karaoke photo. In those cases, the button allows you to download the image.<\/p>\n<p>But you don&#8217;t want or need the Gmail image download button in business or brand emails. So, how do we get rid of it?<\/p>\n<h4>2 Ways on How to Hide the Gmail Image Download Button<\/h4>\n<p>First, two things to know about the download button in Gmail:<\/p>\n<ol>\n<li>Large images.<\/li>\n<li>When the images have no context.<\/li>\n<\/ol>\n<p>Larger, high-resolution images appear to be downloaded as attachments in Gmail webmail. That means the button shouldn&#8217;t show up on small images like icons or decorative elements in an HTML email.<\/p>\n<p>If the image is 299 x 524 or smaller, Gmail won&#8217;t show the download arrow.<\/p>\n<h4>1. Making use of a sibling selector<\/h4>\n<p>Remi Parmentier discovered that you can hide the icon with a sibling selector because Gmail adds a div after the image.<\/p>\n<p><em>img + div { display:none; }<\/em><\/p>\n<p>This selector is very broad, hiding any div adjacent to an image, including ones you&#8217;ve created yourself.<\/p>\n<p>Since Gmail now supports class names, you have much more control.<\/p>\n<p>Unlinked images can be given a class like \u201cg-img\u201d and a CSS style like this in the head.<\/p>\n<p><em>img.g-img + div {display:none;}<\/em><\/p>\n<p>However, if you have a div next to your image, it may be hidden in other clients like Yahoo Mail or iOS. To be safe, add a placeholder div after your unlinked image:<\/p>\n<p><em>&lt;img class=&#8221;g-img&#8221; src=&#8221;https:\/\/media.emailonacid.com\/wp-content\/uploads\/2018\/04\/CodeAnalysisImage.jpg&#8221;&gt;<\/em><\/p>\n<p><em>\u00a0&lt;div&gt;&lt;\/div&gt;<\/em><\/p>\n<p>In order to hide the Gmail download button, you must use a sibling selector.<\/p>\n<h4>2. Addition of a link to email images<\/h4>\n<p>Adding hyperlinks to your images is the easiest way to avoid the Gmail image download button. Many campaigns have a logical place to link so that clicking an image takes subscribers to the right place.<\/p>\n<p>For example, the header image in a Pathwire email recently showed the Gmail image download button.<\/p>\n<p>Or the Nightmare at Email Camp landing page. Then the download button vanishes.<\/p>\n<p>Other email marketing messages&#8217; hero images could (and probably should) link to the email&#8217;s main landing page. Thumbnail images in email newsletters can link directly to the content they represent.<\/p>\n<p>It&#8217;s good practice to link images like that. Images are ideal tap targets for mobile email subscribers.<\/p>\n<p>If an image link isn&#8217;t available, an empty href attribute will work.<\/p>\n<p>On the other hand, subscribers will see their cursor behave as if the image is linked, but clicking it will do nothing. Others have tried cursor:default or pointer-events:none; \u2014 but Gmail ignores these. Because Gmail only accepts style tags in the email body.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s a tiny arrow in the right-hand corner of images. If you&#8217;re an email marketer who strives for email perfection, you&#8217;ll want to disable the Gmail image download button. It was first noticed in 2014, and some thought it was a Gmail webmail bug that would be quickly fixed. Years later, the Gmail image download [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,10,15,1],"tags":[],"class_list":["post-1208","post","type-post","status-publish","format-standard","hentry","category-content-marketing","category-email-marketing","category-mobile-marketing","category-technical-how-to"],"_links":{"self":[{"href":"https:\/\/lite16.com\/blog\/wp-json\/wp\/v2\/posts\/1208","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lite16.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lite16.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lite16.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lite16.com\/blog\/wp-json\/wp\/v2\/comments?post=1208"}],"version-history":[{"count":2,"href":"https:\/\/lite16.com\/blog\/wp-json\/wp\/v2\/posts\/1208\/revisions"}],"predecessor-version":[{"id":1210,"href":"https:\/\/lite16.com\/blog\/wp-json\/wp\/v2\/posts\/1208\/revisions\/1210"}],"wp:attachment":[{"href":"https:\/\/lite16.com\/blog\/wp-json\/wp\/v2\/media?parent=1208"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lite16.com\/blog\/wp-json\/wp\/v2\/categories?post=1208"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lite16.com\/blog\/wp-json\/wp\/v2\/tags?post=1208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}