Hello,
This issue occurs if you do not put the image under MAUI's assets folder or convert its properties to MauiAsset
.
The local HTML file can load Cascading Style Sheets (CSS), JavaScript, and images, if they've also been added to your app project with the MauiAsset build action. Quoted from WebView - Display a local HTML file.
On my side, I add a test.png
into Resources\Raw
folder. After that, the Android WebView can display this image normally.
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.