Repository: saleor/saleor

Issue:
SVG images in email templates
### What I'm trying to achieve
Using gmail web interface I want to see proper logo in emails send from saleor 

### Steps to reproduce the problem
1. Run saleor with configured emails sending
2. Create an account using gmail email address
3. Open "Account confirmation e-mail" using gmail web interface

### Problem
SVG images are blocked by gmail proxy
https://stackoverflow.com/questions/20815613/svg-images-blocked-by-gmail-proxy

### Screenshots
<!-- If applicable, add screenshots to help explain your problem. -->
![image](https://user-images.githubusercontent.com/3868440/81918260-8bd8c280-95d6-11ea-915c-f00edccaac31.png)

### Solution
Replace all SVG images in saleor email templates with PNG or other format supported by email clients



Discussion:

Resolving patch:
diff --git a/saleor/core/emails.py b/saleor/core/emails.py
--- a/saleor/core/emails.py
+++ b/saleor/core/emails.py
@@ -1,18 +1,13 @@
 from urllib.parse import urlsplit
 
 from django.contrib.sites.models import Site
-from django.templatetags.static import static
-
-from ..core.utils import build_absolute_uri
 
 
 def get_email_context():
     site: Site = Site.objects.get_current()
-    logo_url = build_absolute_uri(static("images/logo-light.svg"))
     send_email_kwargs = {"from_email": site.settings.default_from_email}
     email_template_context = {
         "domain": site.domain,
-        "logo_url": logo_url,
         "site_name": site.name,
     }
     return send_email_kwargs, email_template_context


Test patch:
diff --git a/tests/test_core.py b/tests/test_core.py
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -231,10 +231,10 @@ def test_build_absolute_uri(site_settings, settings):
     assert build_absolute_uri(location=url) == url
 
     # Case when static url is resolved to relative url
-    logo_url = build_absolute_uri(static("images/logo-light.svg"))
+    logo_url = build_absolute_uri(static("images/close.svg"))
     protocol = "https" if settings.ENABLE_SSL else "http"
     current_url = "%s://%s" % (protocol, site_settings.site.domain)
-    logo_location = urljoin(current_url, static("images/logo-light.svg"))
+    logo_location = urljoin(current_url, static("images/close.svg"))
     assert logo_url == logo_location
 
 
diff --git a/tests/test_emails.py b/tests/test_emails.py
--- a/tests/test_emails.py
+++ b/tests/test_emails.py
@@ -4,24 +4,20 @@
 import pytest
 from django.core import mail
 from django.core.exceptions import ImproperlyConfigured
-from django.templatetags.static import static
 from templated_email import get_connection
 
 import saleor.account.emails as account_emails
 import saleor.order.emails as emails
 from saleor.core.emails import get_email_context, prepare_url
-from saleor.core.utils import build_absolute_uri
 from saleor.order.utils import add_variant_to_draft_order
 
 
 def test_get_email_context(site_settings):
     site = site_settings.site
-    logo_url = build_absolute_uri(static("images/logo-light.svg"))
 
     expected_send_kwargs = {"from_email": site_settings.default_from_email}
     proper_context = {
         "domain": site.domain,
-        "logo_url": logo_url,
         "site_name": site.name,
     }
 
@@ -309,7 +305,6 @@ def test_send_email_request_change(
     )
     ctx = {
         "domain": "mirumee.com",
-        "logo_url": "http://mirumee.com/static/images/logo-light.svg",
         "redirect_url": "localhost?token=token_example",
         "site_name": "mirumee.com",
     }
@@ -340,7 +335,6 @@ def test_send_email_changed_notification(
     account_emails.send_user_change_email_notification(old_email)
     ctx = {
         "domain": "mirumee.com",
-        "logo_url": "http://mirumee.com/static/images/logo-light.svg",
         "site_name": "mirumee.com",
     }
     recipients = [old_email]