Skip to content

WebImage not working with SVG #347

@mr-kew

Description

@mr-kew

I did try to use the WebImage on SVG that found in example and it's displaying nothing.

Code:

let url = URL(string: "https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/wikimedia.svg")
WebImage(url: url) { image in
    image.resizable()
} placeholder: {
    Text("No image")
}
.indicator(.activity)
.scaledToFit()
.frame(size: .square(side: 300))

Log:

extractOptions:211: *** ERROR: unknown hint identifier 'kCGImageSourceTypeIdentifierHint:public.svg-image' -- ignoring...
createImageAtIndex:1964: *** ERROR: createImageAtIndex 1 could not find plugin for image source [273 bytes] 3C 73 76 67 20 78 6D 6C... '<svg xml'
createImageAtIndex:2093: *** ERROR: createImageAtIndex[0] - 'n/a ' - failed to create image [-62]
CGImageSourceCreateImageAtIndex:5100: *** ERROR: CGImageSourceCreateImageAtIndex[0] - 'n/a ' - failed to create image [-62]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions