Varinder Sandhu
Varinder Sandhu

Reputation: 33

Loading images through URL not working in Xamarin Forms

I am new in Xamarin forms .I was facing a problem to display an image.To fix that, I used four ways to display an image from the URL mentioned below. I already changed HttpClient Implementation -> Managed and SSL/TLS changed into Native TLS 1.2+ but still facing the same problem. Please help me with this

Code-behind way

//1st way

img.Source = new Uri("https://aka.ms/campus.jpg");

//2nd way

ImageSource imageSource = new Uri("https://aka.ms/campus.jpg");

img1.Source = imageSource;

XAML

<Image x:Name="img1" />

<Image Source="https://aka.ms/campus.jpg" />

<Image>
    <Image.Source>
        <UriImageSource
            Uri="https://aka.ms/campus.jpg"
            CacheValidity="10:00:00.0" />
    </Image.Source>
</Image>

Options-> Android Options-> Advanced enter image description here

Upvotes: 3

Views: 847

Answers (1)

Leo Jebran
Leo Jebran

Reputation: 174

Just updating Xamarin forms to the newest version should solve this

Upvotes: 3

Related Questions