From 67ef9041c4e816b71afbdee347bbbe5f74859dc7 Mon Sep 17 00:00:00 2001 From: drfho Date: Thu, 7 Sep 2023 14:37:39 +0200 Subject: [PATCH] svg: added fallback mime by file ext for handling unorthodox svg-xml variants --- src/Products/CMFCore/FSImage.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Products/CMFCore/FSImage.py b/src/Products/CMFCore/FSImage.py index 3687a6d..25b2278 100644 --- a/src/Products/CMFCore/FSImage.py +++ b/src/Products/CMFCore/FSImage.py @@ -81,6 +81,8 @@ def _readFile(self, reparse): self.ZCacheable_invalidate() self._file_mod_time = mtime ct, width, height = getImageInfo(data) + if ct == '' and self.id.endswith('.svg'): + ct = 'image/svg+xml' self.content_type = ct self.width = width self.height = height