Jeremy Childers 1 rok pred
rodič
commit
293aa9bc02
1 zmenil súbory, kde vykonal 3 pridanie a 8 odobranie
  1. 3 8
      coderedcms/views.py

+ 3 - 8
coderedcms/views.py

@@ -130,14 +130,9 @@ def favicon(request):
     if icon:
         # Try to convert to webp, otherwise pass original file format
         # This will happen mainly if the file is an SVG
-        try:
-            return HttpResponsePermanentRedirect(
-                icon.get_rendition("fill-256x256|format-webp").url
-            )
-        except AttributeError:
-            return HttpResponsePermanentRedirect(
-                icon.get_rendition("fill-256x256").url
-            )
+        return HttpResponsePermanentRedirect(
+            icon.get_rendition("fill-256x256|format-webp|preserve-svg").url
+        )
     raise Http404()