How to load an image in kingfisher without an image view?

810 Views Asked by At

Kingfisher allows for some easy methods to load images asynchronously from network or cache, for instance:

imageView.kf.setImage(with: imageUrl)

Is there a way to load the image directly outside of the context of the image view? I.e. something like this:

Kingfisher.loadImage(with: imageUrl) { image in ... }
1

There are 1 best solutions below

0
brzz On

Yeah you just use

KingfisherManager.shared.retrieveImage

That function should have everything you need