assets: don't pass svg to sorl.thumbnail (#26049)

This commit is contained in:
Frédéric Péters 2018-09-04 16:15:24 +02:00
parent e5b45e5f0e
commit 82bade20aa
1 changed files with 4 additions and 1 deletions

View File

@ -82,7 +82,10 @@ class SlotAsset(object):
return self.asset.asset.url if self.asset else ''
def thumb(self):
return get_thumbnail(self.asset.asset, '75x75').url
if self.asset.asset.path.lower().endswith('.svg'):
return self.asset.asset.url
else:
return get_thumbnail(self.asset.asset, '75x75').url
@classmethod
def get_assets(cls):