I'm new on ionic 2 and i'm trying to insert an image, but i don't realize the real path. inside the file app/pages/getting-started/getting-started.html
<ion-content padding class="getting-started">
<ion-card>
<ion-card-content>
<img src="img1.png" alt="">
<img src="img/img1.png" alt="">
<img src="../img/img1.png" alt="">
</ion-card-content>
</ion-card>
</ion-content>
Create a folder app/img and inserted an img1.png file inside it. and the same file inside the app/pages/getting-started folder.
So, this should be easy, but can't find anything inside the ionic docs.
Thanks
I had the same problem while using the Ionic Beta Latest ionic@beta11.
To resolve this problem you can append the images absolute path in the copy.config.js file which will be residing in the node_modules/@ionic/app-scripts/config folder
You can append this file for specific folder by providing source (src) and destination (dest) path.
Hope this helps for copy the images folders to www/build/images folder
Thanks in advance!
I had same problem. Only you must create img folder in www. --> www/img (put images in the folder...)
Then in page (html) your must reference
<img src="img/logo.png" />
I test in Chrome Browser, App Android and App Ios . (Ionic 2.0.0-beta.11)
Regards!
Just copy your img folder in the www folder and you're done! ;)