.NET8 MAUI Image "gif" animation Debug vs. Release

Paul Kelley 0 Reputation points

Has anyone figured out how to get a MAUI Image "gif" animation to work in Release mode?


Using Visual Studio 2022's Android Device Manager, Emulator set to Tablet M-DPI 10.1in - API34, Android 14.0 - API 34, the MAUI Image animation in Debug mode works every single time!  Awesome!  However, when I switch the Build to Release mode and Deploy to the Emulator, the application responds just fine but I see a Image control presenting a FROZEN "gif" and I don't know how to solve the problem.


I experience the same FROZEN "gif" problem if the Emulator is running Pixel 6 Pro Android 14 - API 34.

Using the Debug build, Pixel 6 Pro Android 14 - API 34 Emulator shows the Image control animating the "gif" perfectly!


However, switching Build to Release mode and Deploying to the Pixel 6 Pro Emulator, again I experience the application responding just fine, but the Image control presents a FROZEN "gif".

Here's my XAML definition for my Image element:




When I select my Project and visit "Manage NuGet Packages" and select the "Updates" tab, no updates appear. So, I think I've got the latest.


Maybe you know of a NuGet Package or a Build Release setting that solves the problem? I'm unsure how to proceed.

Thanks for reading this post.

Also posted here: https://techcommunity.microsoft.com/t5/app-development/net8-maui-image-quot-gif-quot-animation-debug-vs-release/m-p/4147943

Microsoft Technologies based on the .NET software framework.
3,524 questions
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,055 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Leon Lu (Shanghai Wicresoft Co,.Ltd.) 70,556 Reputation points Microsoft Vendor


    This issue is reported in the MAUI github repo.Please track on this issue:.Net MAUI 7 Android, Image Gif Animation Not Playing in Release Mode, Normal in Debug Mode.

    Here is a workaround: please create a html and add gif in it. Use your webview to display this html page. I test it in Android emulator in release mode. it is working.

    Here are detailed steps. Or use plugin to show gif in this github link.

    Best Regards,

    Leon Lu

    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.