Episode #434

Loading Remote Images in SwiftUI

13 minutes
Published on March 31, 2020

This video is only available to subscribers. Get access to this video and 506 others.

In UIKit we've often lamented the fact that there is no builtin facility to load an image with a URL, leaving developers to implement this on their own. In SwiftUI the situation is the same, however we have more flexibility to build what we need. Using a Swift package called FetchImage, we will create a reusable ImageView struct that can load our images efficiently given a URL.

Episode Links

  • FetchImage on GitHub - This is a library by Alexander Grebenyuk that provides the image loading behavior. It is based on the Nuke library, which we used in Episode 317.

This episode uses Fetchimage 0.1.0, Xcode 11.4, Swift 5.2.