Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change image size in plotly dash

How do i change the image size? I’ve used the below line of code to insert my image but i cannot seem to figure out how you make it smaller

html.Div(html.Img(src=app.get_asset_url('logo.png')))

i’ve tried:

html.Div(html.Img(src=app.get_asset_url('logo.png')),style={'height':'10%'})

any suggestions

like image 619
Maths12 Avatar asked Oct 21 '19 09:10

Maths12


1 Answers

Move your style attribute inside Img:

html.Div(html.Img(src=app.get_asset_url('logo.png'), style={'height':'10%', 'width':'10%'}))

Probably width is redundant but I'm not sure.

like image 116
Kostas Charitidis Avatar answered Nov 08 '22 12:11

Kostas Charitidis