Back to results for “Performance”
.NET MAUI › Performance & Optimization

How do you optimize image loading and caching in MAUI?

Advanced

Answer

Load appropriately sized images (avoid decoding huge bitmaps for small views), use a caching library or the built-in caching, downsample on load, and reuse sources. For remote images consider a library that caches to disk. Oversized images are a leading cause of memory spikes and jank on mobile.
<Image Source="{Binding ThumbnailUrl}"
       Aspect="AspectFill"
       HeightRequest="64" WidthRequest="64" />
Real-world example Serving 64px thumbnails instead of full-resolution photos removes scroll stutter and large memory allocations in a gallery.

Common follow-ups: Why downsample images? | How does disk caching help?