this is not my code i was searching about a problem and found this but the person posted it 4 years ago i guess no hope.... how do you add picture from local folder in card?
<div id="appB" >
<div >
<card data-image="https://www.worldatlas.com/r/w728-h425-c728x425/upload/23/08/01/shutterstock-104644850.jpg">
<h1 slot="header">Spain</h1>
<p slot="content">Bet On Spain's Team playing against Portugal.</p>
<p slot="content">ETj9Qy3r5DyXw87qEHyp5gXhruFMuicEUR</p>
</card>
</div>
</div>
CodePudding user response:
Firstly if you plan to have this html work non locally (that is you host it somewhere and it runs in other peoples browsers) you can't use a local folder.
But if you still want to do it for local testing purposes use an element with the src attribute being the path to the image relative to the html file.
CodePudding user response:
you just have to save the image and put the path in the src attribute.
pretending you saved worldatlas.jpg at img folder, this is how itll be
<img src="img/worldatlas.jpg">