UPdate.
This commit is contained in:
parent
964a747f42
commit
319c1b1b52
@ -131,7 +131,7 @@ def enrich_image_rendering(text):
|
||||
soup = BeautifulSoup(text, "html.parser")
|
||||
for element in soup.find_all("img"):
|
||||
if element.attrs["src"].startswith("/" ):
|
||||
element.attrs["src"].append("?width=420")
|
||||
element.attrs["src"] += "?width=420"
|
||||
picture_template = f'''
|
||||
<picture>
|
||||
<source srcset="{element.attrs["src"]}" type="{mimetypes.guess_type(element.attrs["src"])[0]}" />
|
||||
|
Loading…
Reference in New Issue
Block a user