Asyncimage not loading image preview on swift playgrounds 4.1 [mac] app

1k views Asked by At

The URL posted above shows an example of the problem i can't seem to solve so far. On the ipad version of swift playgrounds the use of Asyncimage works, however when i load the same code on the mac verison of swift playgrounds, the image preview fails to load every time.

Edit: This problem only occurs with the remote loading of images, if i add an image to the project, it loads just fine.

Edit2: Code Snippet Below

import SwiftUI

struct ContentView: View {
    
    var body: some View {
        Section {
            VStack {
                AsyncImage(url: URL(string: "https://upload.wikimedia.org/wikipedia/commons/thumb/b/b6/Image_created_with_a_mobile_phone.png/1200px-Image_created_with_a_mobile_phone.png")) { image in
                    image
                        .resizable()
                        .scaledToFit()
                } placeholder: {
                    Color.red.opacity(1)
                }
                .frame(width: 200, height: 200)
                .cornerRadius(6)
            }
        }
    }
}
0

There are 0 answers