Image not showing


#1

I have a problem when my application showing a image.

Location file:

My image size is 72ppi and I not resolve this problem.


#2

the path is incorrect, try
src="~/assets/images/logo.png"


#3

I change src, but the problem is still


#4

hmm try the relative path

src="../../assets/images/logo.png"

#5

An image by an external url, does not work either. Do I need to import something?


#6

No, it does not work either.


#7

@kataty89 In your screenshot I see you have added 2 child components inside ScrollView, first Image then again StackLayout. So when second component (StackLayout) is added, that will automatically remove the first component (Image) from ScrollView. So your Image is no longer exists, so it won’t be shown.

It’s not recommended to have 2 child components inside a Page / ScrollView. You must wrap them inside layout (at least when doing it through XML).


#8

Thanks, You resolve my problem!