diff --git a/src/web/layout/image.py b/src/web/layout/image.py index 893a01f..59f2c2a 100644 --- a/src/web/layout/image.py +++ b/src/web/layout/image.py @@ -1,17 +1,19 @@ import dash_mantine_components as dmc +from dash import html +from pathlib import Path +from base64 import b64encode +# read init img +init_img_path = Path(__file__).parent / "init_img.png" +with open(init_img_path.absolute(), "rb") as fh: + init_img_enc = b64encode(fh.read()).decode("utf-8") image_element = dmc.Center( - dmc.Image( + html.Img( + style={ + "width": "100%", + }, id="image-container", - width=600, - height=600, - withPlaceholder=True, - placeholder=[ - dmc.Loader( - color="gray", - size="md" - ) - ] + src=f"data:image/png;base64, {init_img_enc}" ) -) \ No newline at end of file +) diff --git a/src/web/layout/init_img.png b/src/web/layout/init_img.png new file mode 100644 index 0000000..7d821df Binary files /dev/null and b/src/web/layout/init_img.png differ