This commit is contained in:
retoor 2025-05-13 22:54:21 +02:00
parent 3858dcbd62
commit 0ea0cd96db

View File

@ -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"] += "?width=240"
element.attrs["src"] += "?width=240&height=240"
picture_template = f'''
<picture>
<source srcset="{element.attrs["src"]}" type="{mimetypes.guess_type(element.attrs["src"])[0]}" />