Sreejith Krishnadas
Sreejith Krishnadas

Reputation: 346

Xamarin Forms Images not loading from remote URL

I have a demo xamarin forms project that simply displays an image with its image source set to a remote URL. But the problem is it works for some URL and does not for others. I have picked up random image links from google image search and compiled a list of the working / non-working ones. Any insight on this strange behavior is hugely appreciated.

Thanks in Advance!

Working URLs

Non-Working URLs

XAML file

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:XamarinImageTest"
             x:Class="XamarinImageTest.MainPage"
             BackgroundColor="#000000">

    <ContentPage.Content>
        <Image Source="https://i.ytimg.com/vi/JTxPzXQ1Sso/maxresdefault.jpg" 
               VerticalOptions="Fill"
               HorizontalOptions="Fill"></Image>
    </ContentPage.Content>
</ContentPage>

Upvotes: 9

Views: 9834

Answers (2)

user12648060
user12648060

Reputation: 21

I had this issue. Remote images would display in UWP and ISO, but would not display in Android. What worked was updating the NuGet Xamarin packages.

Upvotes: 2

Related Questions