In SwiftUI I’m using Kingfisher
dependency for image download / cashing & have a following issue, when image resized it becomes low quality and blurry.
Here’s my implementation:
struct IconView: View {
let frame: CGFloat
let url: String
let iconPath: String
var body: some View {
if !iconPath.isEmpty {
KFImage(URL(string: "\(url)\(iconPath)"))
.placeholder {
Circle().fill(Color.primaryBackground)
.frame(width: frame, height: frame)
}
.setProcessor(ResizingImageProcessor(referenceSize: CGSize(width: frame , height: frame), mode: .aspectFit))
}
}
}
can anyone suggest right implementation? How to not destroy image quality.