aboutsummaryrefslogtreecommitdiffstats
path: root/modules/ui_extra_networks.py
diff options
context:
space:
mode:
authormissionfloyd <missionfloyd@users.noreply.github.com>2023-03-21 22:07:24 +0000
committermissionfloyd <missionfloyd@users.noreply.github.com>2023-03-21 22:07:24 +0000
commit1d096ed1456c9b9b662477839853621848705e68 (patch)
treecd58036c153b16678e878367cae76065d8cf3b3a /modules/ui_extra_networks.py
parenta9fed7c364061ae6efb37f797b6b522cb3cf7aa2 (diff)
downloadstable-diffusion-webui-gfx803-1d096ed1456c9b9b662477839853621848705e68.tar.gz
stable-diffusion-webui-gfx803-1d096ed1456c9b9b662477839853621848705e68.tar.bz2
stable-diffusion-webui-gfx803-1d096ed1456c9b9b662477839853621848705e68.zip
Lazy load extra network images
Diffstat (limited to 'modules/ui_extra_networks.py')
-rw-r--r--modules/ui_extra_networks.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/ui_extra_networks.py b/modules/ui_extra_networks.py
index cdfd6f2a..1963f6a6 100644
--- a/modules/ui_extra_networks.py
+++ b/modules/ui_extra_networks.py
@@ -131,7 +131,7 @@ class ExtraNetworksPage:
metadata_button = f"<div class='metadata-button' title='Show metadata' onclick={metadata_onclick}></div>"
args = {
- "preview_html": "style='background-image: url(\"" + html.escape(preview) + "\")'" if preview else '',
+ "preview_html": f'<img src="{html.escape(preview)}" class="preview" loading="lazy">' if preview else '',
"prompt": item.get("prompt", None),
"tabname": json.dumps(tabname),
"local_preview": json.dumps(item["local_preview"]),