import dash
from dash import dcc, html
import base64
# cat image from https://www.pexels.com/photo/white-and-grey-kitten-on-brown-and-black-leopard-print-textile-45201/
app = dash.Dash()
name = 'cat2'
image_filename = f'test_test_2/{name}.png'
image_path_webbrowser = app.get_asset_url(f'test_test_2/{name}.png')
image_path_at_server = 'assets/' + image_filename
#encoded_image = base64.b64encode(open(image_path_at_server, 'rb').read()).decode("utf-8")
app.layout = html.Div([
#html.H3("Using a base64 image"),
#.Img(src='data:image/png;base64,{}'.format(encoded_image)),
html.H3(["Using a get_asset_url : ", image_path_at_server ]),
html.Img(src=image_path_webbrowser),
])