From aaa7a9bdb1713a41297f9cbec498068e46e0bbf2 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Thu, 7 Apr 2022 11:41:14 -0700 Subject: [PATCH] Only add loading=lazy if I didn't already specify it on the img. --- voussoir.net/writing/vmarkdown.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/voussoir.net/writing/vmarkdown.py b/voussoir.net/writing/vmarkdown.py index 2704c0f..0ca4db1 100644 --- a/voussoir.net/writing/vmarkdown.py +++ b/voussoir.net/writing/vmarkdown.py @@ -654,7 +654,8 @@ def inject_footnotes(soup): def set_img_lazyload(soup): imgs = soup.find_all('img') for img in imgs: - img['loading'] = 'lazy' + if not img.get('loading'): + img['loading'] = 'lazy' # FINAL MARKDOWNS ################################################################################