Post

Replies

Boosts

Views

Activity

Reply to What is the current proper way to load an image from local filesystem?
Avoid using UIImage(contentsOfFile:), as it can lead to excessive memory consumption, especially with large images. Instead, AsyncImage works perfectly, even with local files. Here’s an example: AsyncImage(url: url) { image in image .resizable(resizingMode: .stretch) .scaledToFit() } placeholder: { Rectangle() } AsyncImage efficiently handles image loading and display, reducing the risk of memory issues.
Topic: App & System Services SubTopic: General Tags:
Jan ’25