{"id":20168,"date":"2020-06-04T18:20:26","date_gmt":"2020-06-04T12:50:26","guid":{"rendered":"https:\/\/email.uplers.com\/blog\/?p=20168"},"modified":"2023-08-22T14:51:44","modified_gmt":"2023-08-22T09:21:44","slug":"how-to-render-background-image-coded-in-mjml-correctly-in-yahoo-mail","status":"publish","type":"post","link":"https:\/\/email.uplers.com\/blog\/how-to-render-background-image-coded-in-mjml-correctly-in-yahoo-mail\/","title":{"rendered":"How to Render Background Image Coded in MJML Correctly in Yahoo! Mail"},"content":{"rendered":"\n<p>Trying background images in email has been a nightmare for email developers since years. However, after 2015, the MSO (Microsoft Office) method helped in troubleshooting several problems in Outlook.\u00a0<\/p>\n\n\n\n<p>Sadly, that was not the happy ending to all the problems. Even though the obstacles in Outlook almost vanished, other email clients, especially Yahoo! Mail continued to create challenges for <a href=\"https:\/\/email.uplers.com\/hire-dedicated-email-developer\/\">email developers<\/a>.<\/p>\n\n\n\n<p>In this article, we shall talk about one such challenge and its workaround.&nbsp;<\/p>\n\n\n\n<div class=\"banner_wrapper\" style=\"\"><div class=\"banner  banner-17416 bottom vert custom-banners-theme-default_style\" style=\"\"><a class=\"custom_banners_big_link\"  target=\"_blank\"  href=\"https:\/\/email.uplers.com\/psd-to-email-html-conversion-service\/\"><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"192\" src=\"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2020\/01\/html-email-coding-768x192-1.jpg\" class=\"attachment-full size-full\" alt=\"\" srcset=\"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2020\/01\/html-email-coding-768x192-1.jpg 768w, https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2020\/01\/html-email-coding-768x192-1-300x75.jpg 300w, https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2020\/01\/html-email-coding-768x192-1-624x156.jpg 624w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>The Problem: Background Image not rendering in Yahoo<\/strong><\/h2>\n\n\n\n<p>While working on MJML email for one of our clients, we faced the challenge of background image not rendering in Yahoo.&nbsp;<\/p>\n\n\n\n<p>It is a universally known fact that for MJML, we can code background images on two tags, namely &lt;mj-section&gt; or &lt;mj-hero&gt;. We have found that on coding with &lt;mj-section&gt;, the background image renders perfectly.<\/p>\n\n\n\n<p>On the contrary, using &lt;mj-hero&gt; renders the background color instead of background image in Yahoo! Mail and AOL Mail.<\/p>\n\n\n\n<p>In the screenshot below, you will be able to see how we have defined background-color. It&#8217;s the usual method for defining background color in MJML.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/FSwKVF4Wjru_7-MYvrygJAB5IzBtx7avaKHAjVi9ZuO7ind0un2560ewAbxKEB1OV7cQ_pwzCPtr6HvHY3zNCeAOl6ZiwKsHe6ecVI47Jp4kiGleSYg0_vWBr9Tv_p3OKvVpht-u\" alt=\"background color in MJML\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Why does this happen?<\/strong><\/h2>\n\n\n\n<p>When we inspected the HTML code to figure out the root cause of this problem, we found that YAHOO-Mail and AOL Mail hide the background image behind background color. For example, if we have defined the background color as black, then it will only display black background color instead of the original background image (as shown in the screenshot below).<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/X7W6Lj4DjvSOaSF6GGs7JQ_TY2E3z2tBWVl6eqzfwnZlsj_kM4gF_4cPtGhFZeFyP7w4jxlShgVpHX-luf5wEps234NSJ1YC0kC5I1ENqDbM3s_D4DT4Is4NnQnBIOL2x_6CiYo1\" alt=\"YAHOO-Mail\"\/><\/figure>\n\n\n\n<p>For cross-checking, we tried another possibility and used no background color. By doing so, we got white background color as shown in the screenshot below.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/4jSbxmnviYRVwzcN3vV39C3YUozx7emV3nVSh5M9C9BDE-tUWe-11w-Hs8MOTk88pcGFx5vZIZUl-AZ1lQ-YcEXeVUKh63IAd3s9-09RGDHCJq7_IanWagxbfAwJMLS4Z0ZViVcl\" alt=\"white background color \"\/><\/figure>\n\n\n\n<p>We tried quite a few tricks to get transparent background color in Yahoo! Mail and AOL Mail, but to no avail. Moreover, it is not possible to define transparent color with Hex code.&nbsp;<\/p>\n\n\n\n<div class=\"banner_wrapper\" style=\"\"><div class=\"banner  banner-17429 bottom vert custom-banners-theme-default_style\" style=\"\"><a class=\"custom_banners_big_link\"  target=\"_blank\"  href=\"https:\/\/email.uplers.com\/email-template-production-services\/\"><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"192\" src=\"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2020\/01\/Email-template-production-768x192-1.jpg\" class=\"attachment-full size-full\" alt=\"\" srcset=\"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2020\/01\/Email-template-production-768x192-1.jpg 768w, https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2020\/01\/Email-template-production-768x192-1-300x75.jpg 300w, https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2020\/01\/Email-template-production-768x192-1-624x156.jpg 624w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>And we found the solution!<\/strong><\/h2>\n\n\n\n<p>As the last resort, we tried to apply <strong>background-color=&#8221;#transparent&#8221;<\/strong> as we have shown in the screenshot below.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/K7sx6xjOlfZ3u26YOwr4IMfjS8IFOmEJJroDLtu50pKui1ybUb7I7Lae1SLN7PTuPnzQJHusMVOgQO6-PVxUkV2Ph4cv1uF6poStBlayIymO0t5lwV7vOiOLWjkV3Q8Eb6Bumu98\" alt=\"apply background-color\"\/><\/figure>\n\n\n\n<p>Voila! It worked for both Yahoo! Mail and AOL Mail.&nbsp;<\/p>\n\n\n\n<p>That\u2019s how the background image rendered on using this workaround.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/daRhjKWqY6XWTchHCtuKJmebYb_ogkffCTXih0b9KYUs-CdQe4vaktTi4Iki1e06uHBjjTQo0_eErXn-9bCYbtLm5jII7dKtWuqDdw_zCHxlJPQUp_cq-Qk6SuzPxOqsdbE-a6Ll\" alt=\"background image rendered\"\/><\/figure>\n\n\n\n<p>In case, you have faced this challenge in the past, you now have a tried and tested solution from <a href=\"https:\/\/email.uplers.com\/\">Email Uplers<\/a>.&nbsp;<\/p>\n\n\n\n<p>Have you faced any other challenges with email rendering? Do let us know in the comments below. We would love to help you by finding a workaround.&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Trying background images in email has been a nightmare for email developers since years. However, after 2015, the MSO (Microsoft Office) method helped in troubleshooting several problems in Outlook.\u00a0 Sadly, that was not the happy ending to all the problems. Even though the obstacles in Outlook almost vanished, other email clients, especially Yahoo! Mail continued [&hellip;]<\/p>\n","protected":false},"author":27,"featured_media":20169,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[382,381],"tags":[],"class_list":["post-20168","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-email-coding","category-email-design"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Tips to Code Render Background Image In MJML Correctly In Yahoo! Mail<\/title>\n<meta name=\"description\" content=\"In this article, we shall talk about one such challenge you are going to face while coding render background image in MJML Correctly In Yahoo! Mail\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/email.uplers.com\/blog\/how-to-render-background-image-coded-in-mjml-correctly-in-yahoo-mail\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Tips to Code Render Background Image In MJML Correctly In Yahoo! Mail\" \/>\n<meta property=\"og:description\" content=\"In this article, we shall talk about one such challenge you are going to face while coding render background image in MJML Correctly In Yahoo! Mail\" \/>\n<meta property=\"og:url\" content=\"https:\/\/email.uplers.com\/blog\/how-to-render-background-image-coded-in-mjml-correctly-in-yahoo-mail\/\" \/>\n<meta property=\"og:site_name\" content=\"Email Uplers\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/email.uplers\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-06-04T12:50:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-22T09:21:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2020\/06\/MJML-540x282.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"540\" \/>\n\t<meta property=\"og:image:height\" content=\"282\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Vivek Makwana\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@email_uplers\" \/>\n<meta name=\"twitter:site\" content=\"@email_uplers\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vivek Makwana\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/email.uplers.com\/blog\/how-to-render-background-image-coded-in-mjml-correctly-in-yahoo-mail\/\",\"url\":\"https:\/\/email.uplers.com\/blog\/how-to-render-background-image-coded-in-mjml-correctly-in-yahoo-mail\/\",\"name\":\"Tips to Code Render Background Image In MJML Correctly In Yahoo! Mail\",\"isPartOf\":{\"@id\":\"https:\/\/email.uplers.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/email.uplers.com\/blog\/how-to-render-background-image-coded-in-mjml-correctly-in-yahoo-mail\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/email.uplers.com\/blog\/how-to-render-background-image-coded-in-mjml-correctly-in-yahoo-mail\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2020\/06\/MJML.jpg\",\"author\":{\"@id\":\"https:\/\/email.uplers.com\/blog\/#\/schema\/person\/4e69dcc1be0c731daac2dfdaafdd544b\"},\"description\":\"In this article, we shall talk about one such challenge you are going to face while coding render background image in MJML Correctly In Yahoo! Mail\",\"breadcrumb\":{\"@id\":\"https:\/\/email.uplers.com\/blog\/how-to-render-background-image-coded-in-mjml-correctly-in-yahoo-mail\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/email.uplers.com\/blog\/how-to-render-background-image-coded-in-mjml-correctly-in-yahoo-mail\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/email.uplers.com\/blog\/how-to-render-background-image-coded-in-mjml-correctly-in-yahoo-mail\/#primaryimage\",\"url\":\"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2020\/06\/MJML.jpg\",\"contentUrl\":\"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2020\/06\/MJML.jpg\",\"width\":1170,\"height\":470},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/email.uplers.com\/blog\/how-to-render-background-image-coded-in-mjml-correctly-in-yahoo-mail\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/email.uplers.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Render Background Image Coded in MJML Correctly in Yahoo! Mail\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/email.uplers.com\/blog\/#website\",\"url\":\"https:\/\/email.uplers.com\/blog\/\",\"name\":\"Email Uplers\",\"description\":\"Email Marketing Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/email.uplers.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/email.uplers.com\/blog\/#\/schema\/person\/4e69dcc1be0c731daac2dfdaafdd544b\",\"name\":\"Vivek Makwana\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/email.uplers.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2020\/06\/vm-96x96.jpg\",\"contentUrl\":\"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2020\/06\/vm-96x96.jpg\",\"caption\":\"Vivek Makwana\"},\"description\":\"Vivek is a front-end developer at Email Uplers, one of the fastest-growing email design and coding companies. He is responsible for implementing visual and interactive elements to our awesome emails and is pretty good at finding out-of-the-box solutions to technical challenges.\",\"sameAs\":[\"http:\/\/www.tgh.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Tips to Code Render Background Image In MJML Correctly In Yahoo! Mail","description":"In this article, we shall talk about one such challenge you are going to face while coding render background image in MJML Correctly In Yahoo! Mail","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/email.uplers.com\/blog\/how-to-render-background-image-coded-in-mjml-correctly-in-yahoo-mail\/","og_locale":"en_US","og_type":"article","og_title":"Tips to Code Render Background Image In MJML Correctly In Yahoo! Mail","og_description":"In this article, we shall talk about one such challenge you are going to face while coding render background image in MJML Correctly In Yahoo! Mail","og_url":"https:\/\/email.uplers.com\/blog\/how-to-render-background-image-coded-in-mjml-correctly-in-yahoo-mail\/","og_site_name":"Email Uplers","article_publisher":"https:\/\/www.facebook.com\/email.uplers\/","article_published_time":"2020-06-04T12:50:26+00:00","article_modified_time":"2023-08-22T09:21:44+00:00","og_image":[{"width":540,"height":282,"url":"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2020\/06\/MJML-540x282.jpg","type":"image\/jpeg"}],"author":"Vivek Makwana","twitter_card":"summary_large_image","twitter_creator":"@email_uplers","twitter_site":"@email_uplers","twitter_misc":{"Written by":"Vivek Makwana","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/email.uplers.com\/blog\/how-to-render-background-image-coded-in-mjml-correctly-in-yahoo-mail\/","url":"https:\/\/email.uplers.com\/blog\/how-to-render-background-image-coded-in-mjml-correctly-in-yahoo-mail\/","name":"Tips to Code Render Background Image In MJML Correctly In Yahoo! Mail","isPartOf":{"@id":"https:\/\/email.uplers.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/email.uplers.com\/blog\/how-to-render-background-image-coded-in-mjml-correctly-in-yahoo-mail\/#primaryimage"},"image":{"@id":"https:\/\/email.uplers.com\/blog\/how-to-render-background-image-coded-in-mjml-correctly-in-yahoo-mail\/#primaryimage"},"thumbnailUrl":"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2020\/06\/MJML.jpg","author":{"@id":"https:\/\/email.uplers.com\/blog\/#\/schema\/person\/4e69dcc1be0c731daac2dfdaafdd544b"},"description":"In this article, we shall talk about one such challenge you are going to face while coding render background image in MJML Correctly In Yahoo! Mail","breadcrumb":{"@id":"https:\/\/email.uplers.com\/blog\/how-to-render-background-image-coded-in-mjml-correctly-in-yahoo-mail\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/email.uplers.com\/blog\/how-to-render-background-image-coded-in-mjml-correctly-in-yahoo-mail\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/email.uplers.com\/blog\/how-to-render-background-image-coded-in-mjml-correctly-in-yahoo-mail\/#primaryimage","url":"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2020\/06\/MJML.jpg","contentUrl":"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2020\/06\/MJML.jpg","width":1170,"height":470},{"@type":"BreadcrumbList","@id":"https:\/\/email.uplers.com\/blog\/how-to-render-background-image-coded-in-mjml-correctly-in-yahoo-mail\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/email.uplers.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Render Background Image Coded in MJML Correctly in Yahoo! Mail"}]},{"@type":"WebSite","@id":"https:\/\/email.uplers.com\/blog\/#website","url":"https:\/\/email.uplers.com\/blog\/","name":"Email Uplers","description":"Email Marketing Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/email.uplers.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/email.uplers.com\/blog\/#\/schema\/person\/4e69dcc1be0c731daac2dfdaafdd544b","name":"Vivek Makwana","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/email.uplers.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2020\/06\/vm-96x96.jpg","contentUrl":"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2020\/06\/vm-96x96.jpg","caption":"Vivek Makwana"},"description":"Vivek is a front-end developer at Email Uplers, one of the fastest-growing email design and coding companies. He is responsible for implementing visual and interactive elements to our awesome emails and is pretty good at finding out-of-the-box solutions to technical challenges.","sameAs":["http:\/\/www.tgh.com"]}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/email.uplers.com\/blog\/wp-json\/wp\/v2\/posts\/20168","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/email.uplers.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/email.uplers.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/email.uplers.com\/blog\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/email.uplers.com\/blog\/wp-json\/wp\/v2\/comments?post=20168"}],"version-history":[{"count":11,"href":"https:\/\/email.uplers.com\/blog\/wp-json\/wp\/v2\/posts\/20168\/revisions"}],"predecessor-version":[{"id":37047,"href":"https:\/\/email.uplers.com\/blog\/wp-json\/wp\/v2\/posts\/20168\/revisions\/37047"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/email.uplers.com\/blog\/wp-json\/wp\/v2\/media\/20169"}],"wp:attachment":[{"href":"https:\/\/email.uplers.com\/blog\/wp-json\/wp\/v2\/media?parent=20168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/email.uplers.com\/blog\/wp-json\/wp\/v2\/categories?post=20168"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/email.uplers.com\/blog\/wp-json\/wp\/v2\/tags?post=20168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}