Questions tagged [kingfisher]

A lightweight, pure-Swift library for downloading and caching images from the web.

A lightweight, pure-Swift library for downloading and caching images from the web.

184 questions
56
votes
9 answers

Get UIImage only with Kingfisher library

I need to get a UIImage only instead of loading a normal UIImageView with Kingfisher library To realize it I implemented a workaround with UIImageView: let imageView = UIImageView() imageView.kf_setImageWithURL(NSURL(string: cpa.imageName)!,…
Patonz
  • 884
  • 1
  • 6
  • 17
31
votes
6 answers

XCode 12: 'SessionDelegate' has different definitions in different modules

Edit: This problem occurs after XCode 12 Beta5. Xcode doesn't allow different modules to define same names (Probably for public classes & protocols). Alamofire and Kingfisher appears to define SessionDelegate at the same time. I'm still trying to…
Feridun Erbaş
  • 573
  • 1
  • 6
  • 19
15
votes
4 answers

Insert Authorization Header field with kingfisher lib

I'm using Kingfisher to show image from url, but my endpoint requires a Authorization header. How to use these kind of url with Kingfisher or SDWebImage in iOS?
sony
  • 730
  • 2
  • 9
  • 19
11
votes
3 answers

How to cache images only in disk using Kingfisher?

I am using Kingfisher library for downloading and caching images. I am facing some issues in the implementation: Are the images cached in both memory and disk? Is there any provision to cache images only on disk? I have already read multiple posts…
PGDev
  • 23,751
  • 6
  • 34
  • 88
9
votes
2 answers

Main thread blocking on scroll and Kingfisher setting the image

I've been running down slow scroll performance and I've noticed that when I scroll and setImage gets called with non-cached images, the performance lags while the download happens. if let imageURL = URL(string: presentable.imageUrl) { let…
Zack Shapiro
  • 6,648
  • 17
  • 83
  • 151
8
votes
6 answers

How to clear memory and disk cache for images loaded using Kingfisherin UITableView?

I need to free all the memory occupied by images fetched using Kingfisher. I have a UITableView that store a lot of images and has the Load More feature also. I tried these measures. In viewDidLoad() I am setting the cache size. let cache =…
Ankit Kumar Gupta
  • 3,994
  • 4
  • 31
  • 54
7
votes
2 answers

How to resize UIImageView after loading image from URL w/ Kingfisher

I would like to resize any downloaded images so they maintain their aspect ratio, however are all as wide as the UITableViewCell they are rendered in. My UIImageView is configured with the contentMode as AspectFit and I have the following anchors on…
Tim J
  • 1,211
  • 1
  • 14
  • 31
6
votes
1 answer

Set UIImage to UIImageView directly with kingfisher

I want to setImage with UIImage directly and not from any Source, Resource. I already have my image and want to set it with caching to my imageView. let myImage = UIImage kingfisherView.kf.setImage(with: myImage) i want this to be done like i set…
Deepak Verma
  • 373
  • 7
  • 19
6
votes
3 answers

Kingfisher image render recycling cells

I'm using Kingfisher to download and cache my images. I'm using the custom class below CustomImageView that extends ImageView. I also am using my custom UITableViewCell to call the loadImage method within the didSet property in my CustomCell class…
antdwash
  • 516
  • 4
  • 10
6
votes
2 answers

What's the Kingfisher default cache behavior?

I am using Kingfisher library for the purpose of caching images in UICollectionView cells. I noticed that calling kf_setImage (assuming that the name of the cell called listCell and its ImageView called imgMain) as…
Ahmad F
  • 30,560
  • 17
  • 97
  • 143
5
votes
3 answers

Initializer for conditional binding must have Optional type, not 'AnyView'

we are facing the issue after updating the Xcode 14.3 /Users/ankit/Library/Developer/Xcode/DerivedData/ProjectName/ dhfelfdsyohhzxfkhlcejfrdx/SourcePackages/checkouts/Kingfisher/Sources/SwiftUI/KFImageRenderer.swift:48:63 Initializer for conditional…
5
votes
1 answer

Why doesn't SwiftUI's Kingfisher KFImage.Placeholder(UIImage(named: "logo")) accept UIImage as acceptable?

I add the following code to a VStack in SwiftUI: KFImage.url(url) .placeholder(UIImage(named: "logo")) .setProcessor(processor) .loadDiskFileSynchronously() But XCode doesn't like it and says "Cannot convert value of type UIImage? to…
AppyAndy
  • 53
  • 1
  • 5
5
votes
0 answers

Kingfisher KFImage how to make it load the cache even if the URL changed?

What I want to achieve I want the KFImage to always read from memory and disk cache, not redownloading the image every time. The user will have a smooth experience without seeing the image downloading for a few seconds everytime the view loads. What…
Jevon Mao
  • 176
  • 3
5
votes
1 answer

IOS Swift Kingfisher Resize processor result blurry image

I'm developing an app using Kingfisher library to load image from ulr and display in CollectionViewCell. I'm trying to resize the image to fit the Contentview of CollectionViewCell. I have tried ResizeProcessor and ScaleFactor from the library but…
Lê Khánh Vinh
  • 2,591
  • 5
  • 31
  • 77
5
votes
3 answers

Value of type 'UIImageView' has no member 'kf' in swift 4

I am using Kingfisher library for downloading an image from URL and setting to UIIMageView in Swift 4 project. I know there are API changes between Kingfisher 2 and Kingfisher 3…
nikhilgohil11
  • 1,185
  • 15
  • 26
1
2 3
12 13