2
0
Jeremy Childers 1 жил өмнө
parent
commit
293aa9bc02
1 өөрчлөгдсөн 3 нэмэгдсэн , 8 устгасан
  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()