image-loading

Cache remote images in memory and disk for SwiftUI apps.

Updated Mar 15, 2026
One-click install
npx skills add https://github.com/jtvaris/sunday-night-dynasty --skill image-loading-jtvaris
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: image-loading
Source: https://github.com/jtvaris/sunday-night-dynasty/tree/main/.agents/skills/generators/image-loading
Command: npx skills add https://github.com/jtvaris/sunday-night-dynasty --skill image-loading-jtvaris

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Image-heavy SwiftUI apps often suffer from slow image loading, wasted bandwidth, and high memory usage. This Skill provides a production-ready image loading pipeline that caches images in memory and on disk, reduces redundant downloads, and offers a drop-in SwiftUI view for seamless integration.

Core Features & Use Cases

  • In-memory NSCache and disk-based LRU caching to speed up image display.
  • Deduplicated downloads to prevent multiple requests for the same URL.
  • Optional image processing (resize, thumbnail) to optimize memory usage.
  • Drop-in replacement for AsyncImage via CachedAsyncImage.

Quick Start

Replace AsyncImage with CachedAsyncImage and configure the pipeline to cache images in memory and on disk.

Frequently Asked Questions about image-loading

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I cache and load remote images in SwiftUI without downloading them repeatedly?

To cache remote images in SwiftUI, a production-grade pipeline combines in-memory NSCache and LRU disk caching with actor-based downloaders. This deduplicates requests and prevents redundant network calls, ensuring images load instantly across iOS and macOS.

What is the best way to replace AsyncImage with a cached image view in SwiftUI?

The best way to replace AsyncImage in SwiftUI is using a drop-in CachedAsyncImage view. This connects to a pipeline handling in-memory NSCache and disk LRU caching, eliminating slow image loading bottlenecks and redundant URL requests.

Can I process and resize images before saving them to the disk cache in SwiftUI?

Yes, you can process and resize remote images before disk caching. The image loading pipeline supports optional image processing such as resizing and thumbnail generation to optimize memory usage for SwiftUI views.

Does this image loading pipeline support both iOS and macOS platforms?

Yes, the image loading pipeline supports safe cross-platform handling across iOS and macOS. It utilizes an actor-based downloader and NSCache-based memory cache to ensure reliable remote image loading and disk caching for SwiftUI apps.

Why does my SwiftUI app use high memory when displaying multiple remote images?

High memory usage in image-heavy SwiftUI apps often results from lacking proper caching and processing. Implementing an NSCache-based memory cache alongside optional image processing like resizing reduces memory overhead and speeds up image display.