[英].NET MAUI Blazor Hybrid local images not loading
Working on a .NET MAUI Blazor Hybrid and using MudBlazor for my UI.在 .NET MAUI Blazor Hybrid 上工作,并将 MudBlazor 用于我的 UI。 Images are currently not loading in my app.
图片目前没有加载到我的应用程序中。 I have the following declared in the project file:
我在项目文件中声明了以下内容:
<!-- Images -->
<MauiImage Include="Resources\Images\*" />
Example call in the razor UI: razor UI 中的示例调用:
<MudAvatar Image="resources/images/foo.jpeg" Size="Size.Large" />
I should also mention if I call an external image in the razor UI it works.我还应该提到,如果我在 razor 用户界面中调用外部图像,它会起作用。 Following example image loads without any issues:
以下示例图像加载没有任何问题:
<MudAvatar Image="https://pbs.twimg.com/profile_images/1313493454710857730/ddYgxm9j_400x400.jpg" Size="Size.Large" />
I am testing the app in the Android Emulator and confirmed the image properties Build Action is set to MauiImage.我正在 Android 模拟器中测试该应用程序,并确认图像属性 Build Action 已设置为 MauiImage。
Am I missing something?我错过了什么吗? Thanks in advance!
提前致谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.