[Bug] UriImageSourceService fails to load some images on Windows
See original GitHub issueSteps to Reproduce
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MauiApp3.MainPage">
<VerticalStackLayout VerticalOptions="Start">
<Label Text="1:"/>
<Image MaximumHeightRequest="80"
Source="https://upload.wikimedia.org/wikipedia/commons/thumb/b/ba/Paintedcats_Red_Star_standing.jpg/187px-Paintedcats_Red_Star_standing.jpg"/>
<Label Text="2"/>
<Image MaximumHeightRequest="80"
Source="https://upload.wikimedia.org/wikipedia/commons/f/f6/Mammuthus_exilis.jpg"/>
<Label Text="3"/>
<Image MaximumHeightRequest="80"
Source="https://upload.wikimedia.org/wikipedia/commons/thumb/e/e8/Sphinx2_July_2006.jpg/180px-Sphinx2_July_2006.jpg"/>
</VerticalStackLayout>
</ContentPage>
Expected Behavior
All images are displayed.
Actual Behavior
Only the first one is displayed.
If you load the image inside a browser first then WinUI is able to load the image.
Logs:
Microsoft.Maui.UriImageSourceService: Warning: Unable to load image URI 'https://upload.wikimedia.org/wikipedia/commons/thumb/e/e8/Sphinx2_July_2006.jpg/180px-Sphinx2_July_2006.jpg'.
System.InvalidOperationException: Unable to load image stream.
at Microsoft.Maui.UriImageSourceService.GetImageSourceAsync(IUriImageSource imageSource, Single scale, CancellationToken cancellationToken)
Microsoft.Maui.UriImageSourceService: Warning: Unable to load image URI 'https://upload.wikimedia.org/wikipedia/commons/f/f6/Mammuthus_exilis.jpg'.
System.InvalidOperationException: Unable to load image stream.
at Microsoft.Maui.UriImageSourceService.GetImageSourceAsync(IUriImageSource imageSource, Single scale, CancellationToken cancellationToken)
Basic Information
- Version with issue: MAUI Preview 8
- SKD: net6.0-windows10.0.19041
It works fine on Android.
Screenshots
Reproduction Link
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:17 (9 by maintainers)
Top Results From Across the Web
Windows 10 in app images failing to load
So I am asking if anyone here may know another solution to my issue which is in some apps the built in icons...
Read more >Recognize .NET MAUI Image loading failure - Microsoft Q&A
I'm using the .NET MAUI Image control to display images stored on disk. In rare cases an image file can be damaged, so...
Read more >Solved: Photos Cannot Preview or Open in Windows
Methods to fix Photos Cannot Preview or Open in Windows Error · 1. Update Windows Photo Viewer · 2. Open photos in different...
Read more >How to fix 'Windows Photo Viewer can't open this picture' ...
This post shares how you can fix 'Windows Photo Viewer can't open this picture' problem and view your photos on Windows PC.
Read more >How to Fix the Photos File System Error in Windows 10 and ...
5. Clean Boot Windows ... To ensure there isn't a third-party app or service interfering with Photos in any way, try clean-booting Windows....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@PureWeen Yes, if I open the image in browser beforehand, it does show up.
Hello lovely human, thank you for your comment on this issue. Because this issue has been closed for a period of time, please strongly consider opening a new issue linking to this issue instead to ensure better visibility of your comment. Thank you!