How do I display an image


#1

Sorry if this is a super noob question but I just cannot figure out how to display an image.

Any help is appreciated.

Thank you.


#2

Can you provide some more info?

Any code snippets or codepen demos?


#3

Ty putting this in the ion-content directive:

<img src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcRShgP73elHuAh1Y6JAZYRozq1rppaBJOeveHcqZySFQuUrgk4cEoBaAIaK" alt="A random image" />

Should give the following image:
A random image


#4

I had my image folder in the root of www and kept getting 404. I moved my image folder into the img folder and now it works. Also, I was using a leading slash which I think messed it up too.

Thanks!


#5

Hi MarkNeon,

if your image folder is in the root off the www folder than the code should look like this:


< img src="img/yourImage.png" />

Folderstructure: c:\workspace/projectname/www/img/yourImage.png

regards
mav


#6

Hi Mav,

Yeah, eventually I figure that out.

Thanks.