Store thumbnails as files instead of base64 strings
This improves the UI responsiveness for large histories.
This commit is contained in:
parent
a08802bf70
commit
43b6ab8673
3 changed files with 15 additions and 14 deletions
|
@ -2,7 +2,7 @@ from pathlib import Path
|
|||
|
||||
import gradio as gr
|
||||
|
||||
from modules.html_generator import image_to_base64
|
||||
from modules.html_generator import get_image_cache
|
||||
|
||||
|
||||
def generate_html():
|
||||
|
@ -64,7 +64,7 @@ def generate_html():
|
|||
path = Path(i)
|
||||
if path.exists():
|
||||
try:
|
||||
image_html = f'<img src="data:image/png;base64,{image_to_base64(path)}">'
|
||||
image_html = f'<img src="file/{get_image_cache(path)}">'
|
||||
break
|
||||
except:
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue