SwiftUI: ImageRenderer and AsyncImage
law.gmnz.xyz·2h
🖼️JPEG XL
Preview
Report Post

Law’s Blog

Home Blog

  • 28 Dec, 2025 *

Last week, I was learning how to save images using ImageRenderer. The goal was to save the whole View stack including all the AsyncImages as an image, save it to the Downloads folder.

It turns out, it wasn’t that simple. Because, I found out that every time I called the ImageRenderer function it will download the image inside the AsyncImage and not retrieve it from cache. Or should I say, AsyncImage does not have caching built-in? Not sure, I should investigate this in the future.

Solution

The solution was to create a caching mechanism for AsyncImage, which you can [check it here](https://g…

Similar Posts

Loading similar posts...