Only add loading=lazy if I didn't already specify it on the img.
This commit is contained in:
parent
ec38f1a47a
commit
aaa7a9bdb1
1 changed files with 2 additions and 1 deletions
|
@ -654,7 +654,8 @@ def inject_footnotes(soup):
|
||||||
def set_img_lazyload(soup):
|
def set_img_lazyload(soup):
|
||||||
imgs = soup.find_all('img')
|
imgs = soup.find_all('img')
|
||||||
for img in imgs:
|
for img in imgs:
|
||||||
img['loading'] = 'lazy'
|
if not img.get('loading'):
|
||||||
|
img['loading'] = 'lazy'
|
||||||
|
|
||||||
# FINAL MARKDOWNS
|
# FINAL MARKDOWNS
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
Loading…
Reference in a new issue