sync building image update: compile image via proxy

This commit is contained in:
tmshv committed 2020-03-10 18:32:51 +03:00
1 parent f52641b739
commit ffd8396fa0
3 files changed
+12 -8

No files matched your search

+2
View File
@@ -121,10 +121,12 @@ class ImageToken(Token):
return data
async def compile(self):
s = 1500 # ('big', 1500, 667)
img = await self.get_data()
alt = img['alt']
caption = markdown_to_html(img['caption'])
src = img['src']
src = f'https://images.weserv.nl/?url=${src}&w=${s}&h=${s}'
tpl = f'''
<div class="kazimir__image">