[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-1088":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":9,"totalLinesOfCode":9,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":9,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":9,"pushedAt":9,"updatedAt":34,"readmeContent":35,"aiSummary":36,"trendingCount":16,"starSnapshotCount":16,"syncStatus":37,"lastSyncTime":38,"discoverSource":39},1088,"Kingfisher","onevcat\u002FKingfisher","onevcat","A lightweight, pure-Swift library for downloading and caching images from the web.",null,"https:\u002F\u002Fgithub.com\u002Fonevcat\u002FKingfisher","Swift",24346,2760,353,172,0,1,9,34,5,76.9,false,"main",[25,26,27,28,29,30,31,32,33],"swift","kingfisher","image","cache","filters","image-processor","xcode","ios","macos","2026-06-12 04:00:07","\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fonevcat\u002FKingfisher\u002Fmaster\u002Fimages\u002Flogo.png\" alt=\"Kingfisher\" title=\"Kingfisher\" width=\"557\"\u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fonevcat\u002FKingfisher\u002Factions?query=workflow%3Abuild\">\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fonevcat\u002Fkingfisher\u002Fworkflows\u002Fbuild\u002Fbadge.svg?branch=master\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fswiftpackageindex.com\u002Fonevcat\u002FKingfisher\u002Fmaster\u002Fdocumentation\u002Fkingfisher\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FSwift-Doc-DE5C43.svg?style=flat\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fcocoapods.org\u002Fpods\u002FKingfisher\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Ftag\u002Fonevcat\u002FKingfisher.svg?color=blue&include_prereleases=&sort=semver\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fswift.org\u002Fpackage-manager\u002F\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FSPM-supported-DE5C43.svg?style=flat\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fonevcat\u002FKingfisher\u002Fmaster\u002FLICENSE\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-black\">\u003C\u002Fa>\n\u003C\u002Fp>\n\nKingfisher is a powerful, pure-Swift library for downloading and caching images from the web. It provides you a chance to use a pure-Swift way to work with remote images in your next app.\n\n## Features\n\n- [x] Asynchronous image downloading and caching.\n- [x] Loading image from either `URLSession`-based networking or local provided data.\n- [x] Useful image processors and filters provided.\n- [x] Multiple-layer hybrid cache for both memory and disk.\n- [x] Fine control on cache behavior. Customizable expiration date and size limit.\n- [x] Opt-in async cache probing in `KingfisherManager` to avoid blocking the caller thread on disk cache checks.\n- [x] Cancelable downloading and auto-reusing previous downloaded content to improve performance.\n- [x] Independent components. Use the downloader, caching system, and image processors separately as you need.\n- [x] Prefetching images and showing them from the cache to boost your app.\n- [x] Extensions for `UIImageView`, `NSImageView`, `NSButton`, `UIButton`, `NSTextAttachment`, `WKInterfaceImage`, `TVMonogramView` and `CPListItem` to directly set an image from a URL.\n- [x] Built-in transition animation when setting images.\n- [x] Customizable placeholder and indicator while loading images.\n- [x] Extensible image processing and image format easily.\n- [x] Low Data Mode support.\n- [x] SwiftUI support.\n- [x] Swift 6 & Swift Concurrency (strict mode) prepared.\n- [x] Load & cache for Live Photo.\n\n### Kingfisher 101\n\nThe simplest use-case is setting an image to an image view with the `UIImageView` extension:\n\n```swift\nimport Kingfisher\n\nlet url = URL(string: \"https:\u002F\u002Fexample.com\u002Fimage.png\")\nimageView.kf.setImage(with: url)\n```\n\nKingfisher will download the image from `url`, send it to both memory cache and disk cache, and display it in `imageView`. \nWhen you set it with the same URL later, the image will be retrieved from the cache and shown immediately.\n\nIt also works if you use SwiftUI:\n\n```swift\nvar body: some View {\n    KFImage(URL(string: \"https:\u002F\u002Fexample.com\u002Fimage.png\")!)\n}\n```\n\n### A More Advanced Example\n\nWith the powerful options, you can do hard tasks with Kingfisher in a simple way. For example, the code below: \n\n1. Downloads a high-resolution image.\n2. Downsamples it to match the image view size.\n3. Makes it round cornered with a given radius.\n4. Shows a system indicator and a placeholder image while downloading.\n5. When prepared, it animates the small thumbnail image with a \"fade in\" effect. \n6. The original large image is also cached to disk for later use, to get rid of downloading it again in a detail view.\n7. A console log is printed when the task finishes, either for success or failure.\n\n```swift\nlet url = URL(string: \"https:\u002F\u002Fexample.com\u002Fhigh_resolution_image.png\")\nlet processor = DownsamplingImageProcessor(size: imageView.bounds.size)\n             |> RoundCornerImageProcessor(cornerRadius: 20)\nimageView.kf.indicatorType = .activity\nimageView.kf.setImage(\n    with: url,\n    placeholder: UIImage(named: \"placeholderImage\"),\n    options: [\n        .processor(processor),\n        .scaleFactor(UIScreen.main.scale),\n        .transition(.fade(1)),\n        .cacheOriginalImage\n    ])\n{\n    result in\n    switch result {\n    case .success(let value):\n        print(\"Task done for: \\(value.source.url?.absoluteString ?? \"\")\")\n    case .failure(let error):\n        print(\"Job failed: \\(error.localizedDescription)\")\n    }\n}\n```\n\nIt is a common situation I can meet in my daily work. Think about how many lines you need to write without\nKingfisher!\n\n### Method Chaining\n\nIf you are not a fan of the `kf` extension, you can also prefer to use the `KF` builder and chained the method \ninvocations. The code below is doing the same thing:\n\n```swift\n\u002F\u002F Use `kf` extension\nimageView.kf.setImage(\n    with: url,\n    placeholder: placeholderImage,\n    options: [\n        .processor(processor),\n        .loadDiskFileSynchronously,\n        .cacheOriginalImage,\n        .transition(.fade(0.25)),\n        .lowDataMode(.network(lowResolutionURL))\n    ],\n    progressBlock: { receivedSize, totalSize in\n        \u002F\u002F Progress updated\n    },\n    completionHandler: { result in\n        \u002F\u002F Done\n    }\n)\n\n\u002F\u002F Use `KF` builder\nKF.url(url)\n  .placeholder(placeholderImage)\n  .setProcessor(processor)\n  .loadDiskFileSynchronously()\n  .cacheMemoryOnly()\n  .fade(duration: 0.25)\n  .lowDataModeSource(.network(lowResolutionURL))\n  .onProgress { receivedSize, totalSize in  }\n  .onSuccess { result in  }\n  .onFailure { error in }\n  .set(to: imageView)\n```\n\nAnd even better, if later you want to switch to SwiftUI, just change the `KF` above to `KFImage`, and you've done:\n\n```swift\nstruct ContentView: View {\n    var body: some View {\n        KFImage.url(url)\n          .placeholder(placeholderImage)\n          .setProcessor(processor)\n          .loadDiskFileSynchronously()\n          .cacheMemoryOnly()\n          .fade(duration: 0.25)\n          .lowDataModeSource(.network(lowResolutionURL))\n          .onProgress { receivedSize, totalSize in  }\n          .onSuccess { result in  }\n          .onFailure { error in }\n    }\n}\n```\n\n## Requirements\n\n### Kingfisher 8.0\n\n- (UIKit\u002FAppKit) iOS 13.0+ \u002F macOS 10.15+ \u002F tvOS 13.0+ \u002F watchOS 6.0+ \u002F visionOS 1.0+\n- (SwiftUI) iOS 14.0+ \u002F macOS 11.0+ \u002F tvOS 14.0+ \u002F watchOS 7.0+ \u002F visionOS 1.0+\n- Swift 5.9+\n\n### Kingfisher 7.0\n\n- (UIKit\u002FAppKit) iOS 12.0+ \u002F macOS 10.14+ \u002F tvOS 12.0+ \u002F watchOS 5.0+ \u002F visionOS 1.0+\n- (SwiftUI) iOS 14.0+ \u002F macOS 11.0+ \u002F tvOS 14.0+ \u002F watchOS 7.0+ \u002F visionOS 1.0+\n- Swift 5.0+\n\n### Installation\n\nRefer to one of the following tutorials to install and use the framework:\n\n- [UIKit Tutorial](https:\u002F\u002Fswiftpackageindex.com\u002Fonevcat\u002Fkingfisher\u002Fmaster\u002Ftutorials\u002Fkingfisher\u002Fgettingstarteduikit)\n- [SwiftUI Tutorial](https:\u002F\u002Fswiftpackageindex.com\u002Fonevcat\u002Fkingfisher\u002Fmaster\u002Ftutorials\u002Fkingfisher\u002Fgettingstartedswiftui)\n\nAlternatively, you can follow either of the methods below.\n\n#### Swift Package Manager\n\n- File > Swift Packages > Add Package Dependency\n- Add `https:\u002F\u002Fgithub.com\u002Fonevcat\u002FKingfisher.git`\n- Select \"Up to Next Major\" with \"8.0.0\"\n\n#### CocoaPods\n\n```ruby\nsource 'https:\u002F\u002Fgithub.com\u002FCocoaPods\u002FSpecs.git'\nplatform :ios, '13.0'\nuse_frameworks!\n\ntarget 'MyApp' do\n  pod 'Kingfisher', '~> 8.0'\nend\n```\n\n#### Pre-built Framework\n\n1. Open the release page, download the latest version of Kingfisher from the assets section. \n2. Drag the `Kingfisher.xcframework` into your project and add it to the target (usually the app target).\n3. Select your target, in the \"General\" Tab, find the \"Frameworks, Libraries, and Embedded Content\" section, set the `Embed Without Signing` to Kingfisher.\n\n## Documentation\n\nCheck the documentation and tutorials:\n\n- [Documentation Home](https:\u002F\u002Fswiftpackageindex.com\u002Fonevcat\u002Fkingfisher\u002Fmaster\u002Fdocumentation\u002Fkingfisher)\n- [Getting Started](https:\u002F\u002Fswiftpackageindex.com\u002Fonevcat\u002Fkingfisher\u002Fmaster\u002Fdocumentation\u002Fkingfisher\u002Fgettingstarted)\n    - [UIKit Tutorial](https:\u002F\u002Fswiftpackageindex.com\u002Fonevcat\u002Fkingfisher\u002Fmaster\u002Ftutorials\u002Fkingfisher\u002Fgettingstarteduikit)\n    - [SwiftUI Tutorial](https:\u002F\u002Fswiftpackageindex.com\u002Fonevcat\u002Fkingfisher\u002Fmaster\u002Ftutorials\u002Fkingfisher\u002Fgettingstartedswiftui)\n- [Common Tasks - General](https:\u002F\u002Fswiftpackageindex.com\u002Fonevcat\u002Fkingfisher\u002Fmaster\u002Fdocumentation\u002Fkingfisher\u002Fcommontasks)\n    - [Common Tasks - Cache](https:\u002F\u002Fswiftpackageindex.com\u002Fonevcat\u002Fkingfisher\u002Fmaster\u002Fdocumentation\u002Fkingfisher\u002Fcommontasks_cache)\n    - [Common Tasks - Downloader](https:\u002F\u002Fswiftpackageindex.com\u002Fonevcat\u002Fkingfisher\u002Fmaster\u002Fdocumentation\u002Fkingfisher\u002Fcommontasks_downloader)\n    - [Common tasks - Processor](https:\u002F\u002Fswiftpackageindex.com\u002Fonevcat\u002Fkingfisher\u002Fmaster\u002Fdocumentation\u002Fkingfisher\u002Fcommontasks_processor)\n\n### Migrating\n\n- [Kingfisher 8.0 Migration](https:\u002F\u002Fswiftpackageindex.com\u002Fonevcat\u002Fkingfisher\u002Fmaster\u002Fdocumentation\u002Fkingfisher\u002Fmigration-to-8)\n- [Kingfisher 7.0 Migration](https:\u002F\u002Fgithub.com\u002Fonevcat\u002FKingfisher\u002Fwiki\u002FKingfisher-7.0-Migration-Guide)\n\nIf you are using an even earlier version, see the guides below to know the steps for migrating.\n\n## Other\n\n### Future of Kingfisher\n\nI want to keep Kingfisher lightweight. This framework focuses on providing a simple solution for downloading and caching images. This doesn’t mean the framework can’t be improved. Kingfisher is far from perfect, so necessary and useful updates will be made to make it better.\n\n### Developments and Tests\n\nAny contributing and pull requests are warmly welcome. However, before you plan to implement some features or try to fix an uncertain issue, it is recommended to open a discussion first. It would be appreciated if your pull requests could build with all tests green. :)\n\n### About the logo\n\nThe logo of Kingfisher is inspired by [Tangram (七巧板)](http:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FTangram), a dissection puzzle consisting of seven flat shapes from China. I believe she's a kingfisher bird instead of a swift, but someone insists that she is a pigeon. I guess I should give her a name. Hi, guys, do you have any suggestions?\n\n### Contact\n\nFollow and contact me on [Twitter](http:\u002F\u002Ftwitter.com\u002Fonevcat) or [Sina Weibo](http:\u002F\u002Fweibo.com\u002Fonevcat). If you find an issue, [open a ticket](https:\u002F\u002Fgithub.com\u002Fonevcat\u002FKingfisher\u002Fissues\u002Fnew). Pull requests are warmly welcome as well.\n\n## Backers & Sponsors\n\nOpen-source projects cannot live long without your help. If you find Kingfisher to be useful, please consider supporting this \nproject by becoming a sponsor. Your user icon or company logo shows up [on my blog](https:\u002F\u002Fonevcat.com\u002Ftabs\u002Fabout\u002F) with a link to your home page. \n\nBecome a sponsor through [GitHub Sponsors](https:\u002F\u002Fgithub.com\u002Fsponsors\u002Fonevcat). :heart:\n\nSpecial thanks to:\n\n[![imgly](https:\u002F\u002Fuser-images.githubusercontent.com\u002F1812216\u002F106253726-271ed000-6218-11eb-98e0-c9c681925770.png)](https:\u002F\u002Fimg.ly\u002F)\n\n[![emergetools](https:\u002F\u002Fgithub-production-user-asset-6210df.s3.amazonaws.com\u002F1019875\u002F254794187-d44f6f50-993f-42e3-b79c-960f69c4adc1.png)](https:\u002F\u002Fwww.emergetools.com)\n\n\n\n### License\n\nKingfisher is released under the MIT license. See LICENSE for details.\n","Kingfisher 是一个轻量级的纯 Swift 库，用于从网络下载和缓存图片。其核心功能包括异步图片下载、多层混合内存与磁盘缓存、可自定义的缓存行为（如过期时间和大小限制），以及支持多种图像处理器和过滤器。此外，它还提供了针对 `UIImageView` 等视图组件的扩展方法，便于直接通过 URL 设置图片，并内置了过渡动画和加载指示器等功能。适用于 iOS 和 macOS 应用开发中需要高效处理远程图片的各种场景，如社交应用、新闻阅读器等，能够显著提升用户体验并优化性能。",2,"2026-06-11 02:41:32","trending"]