Closed nirleshem closed 4 years ago
@nirleshem See more : https://github.com/SDWebImage/SDWebImageSwiftUI/issues/87
Did you use the opacity
CSS attr in your SVG CSS style ? You should replace it with rgba
or fill-opacity
instead.
@nirleshem Any update about this ?
I am also getting this crash
@SebastianKTDC Is this workaround solve your problem ? https://github.com/SDWebImage/SDWebImageSVGCoder#compatibility-for-coresvg-framework
Or new cases ? Please provide your SVG files
Hello @dreampiggy I just checked my svgs and there seems to be no opacity on path applied. here is the image https://sentrycdn.s3.eu-north-1.amazonaws.com/avatar/action.svg
I am also using both this plugin and sdwebimage trough SPM
<g fill="#161616" mask="url(#d)" opacity=".5">
This same issue. The opacity
attribute and fill
can not been combined together by Apple's CoreSVG.
Use the fill color with alpha value instead.
Change this into:
<g fill="rgba(22, 22, 22, .5)" mask="url(#d)">
May solve the problem. I can update the readme, this does not limited only with <path>
But this seems not what web browser rendered
thanks, I will test it out
it works, thanks for the help. I fixed my images and all good now
I've already fired Radar for this: FB7670447
This crash seems occur on iOS only, same SVG files on macOS does not cause crash.
@dreampiggy I got the same problem and when I try to import SVG file into SF Symbols app it cannot validate it, so I cannot export it. Also, where should I use
@Zulfhar Xcode 11 does not support import raw SVG files into App's Asset Catalog. The SVG
file only recognized as SF Symbols (SF Symbols and SVG is two different thing, SF Symbols are collection of multiple SVGs).
So, for your own SVG images, you can put it into your App's working directory (copy resources into your ipa), treat it as Raw Data, load it from Bundle in runtime by using the code sample in readme. Or you can donwload from network.
There are also tricks to let Xcode import your true SVG into Asset Catalog, but not officially supported, see:
https://twitter.com/DreamingPiggy/status/1244259615602118657
Issue reproduced while scrolling in a basic UITableView implementation.