{"id":15055324,"url":"https://github.com/leoz/cachedimage","last_synced_at":"2025-10-04T15:30:25.796Z","repository":{"id":193862735,"uuid":"689637140","full_name":"leoz/CachedImage","owner":"leoz","description":"Asynchronous Image Loading from URL in SwiftUI","archived":false,"fork":true,"pushed_at":"2024-01-26T15:14:58.000Z","size":5956,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-30T22:20:45.800Z","etag":null,"topics":["asynchronous","asyncimage","image","ios","macos","swift","swift-package","swift-package-manager","swiftui"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"V8tr/AsyncImage","license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leoz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-10T12:52:20.000Z","updated_at":"2024-08-26T01:13:51.000Z","dependencies_parsed_at":"2023-09-10T14:07:01.193Z","dependency_job_id":null,"html_url":"https://github.com/leoz/CachedImage","commit_stats":null,"previous_names":["leoz/cachedimage"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoz%2FCachedImage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoz%2FCachedImage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoz%2FCachedImage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoz%2FCachedImage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leoz","download_url":"https://codeload.github.com/leoz/CachedImage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235264999,"owners_count":18962466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asynchronous","asyncimage","image","ios","macos","swift","swift-package","swift-package-manager","swiftui"],"created_at":"2024-09-24T21:40:53.450Z","updated_at":"2025-10-04T15:30:25.789Z","avatar_url":"https://github.com/leoz.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CachedImage\n\n[![Build](https://github.com/leoz/CachedImage/actions/workflows/swift.yml/badge.svg?branch=master)](https://github.com/leoz/CachedImage/actions/workflows/swift.yml)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fleoz%2FCachedImage%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/leoz/CachedImage)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fleoz%2FCachedImage%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/leoz/CachedImage)\n![License](https://img.shields.io/github/license/leoz/CachedImage)\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/leoz/CachedImage/blob/master/Assets/demo.gif\" style=\"margin: auto; width: 295px\"/\u003e\n\u003c/p\u003e\n\n## 🔭 Overview\n\n`CachedImage` is a SwiftUI component to asynchronously load and display an image provided by its URL.\n\nThis package is based on the [AsyncImage](https://github.com/V8tr/AsyncImage) project published by [Vadim Bulavin](https://github.com/V8tr) and described in the [Asynchronous Image Loading from URL in SwiftUI](https://www.vadimbulavin.com/asynchronous-swiftui-image-loading-from-url-with-combine-and-swift/) article.\n\n## 🛠️ Usage\n\n### Quick Start\n\n```swift\nimport CachedImage\n\nlet images = (0...20).map {\n    \"https://picsum.photos/800/600?random=\\($0)\"\n}\nlet imageURLs = images.map {\n    URL(string: $0)!\n}\n\nstruct ContentView: View {\n    var body: some View {\n        List(imageURLs, id: \\.self) { url in\n            CachedImage(\n                url: url,\n                content: { image in\n                    image\n                        .resizable()\n                        .aspectRatio(contentMode: .fit)\n                },\n                placeholder: {\n                    Text(\"Loading ...\")\n                }\n            )\n            .scaledToFit()\n        }\n    }\n}\n```\n\n### Demo Program\n\nCheck the demo project provided here: [Demo](./Demo/).\n\n## ✍️ Author\n\n[Vadim Bulavin](https://github.com/V8tr) \u0026 [Leonid Zolotarev](https://github.com/leoz)\n\n## 📃 License\n\n`CachedImage` is available under the Unlicense. See the [LICENSE](./LICENSE.md) file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleoz%2Fcachedimage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleoz%2Fcachedimage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleoz%2Fcachedimage/lists"}