Ad

SVG Does Not Display Correctly, IOS Safari

- 1 answer

I was supplied a logo for a website in .ai format, which I cropped and saved as SVG1.1, and placed this on multiple places on a friend's Shopify store.

Image in question (view this in Safari for iOS)

Screenshot of the image fault on the site: i.stack.imgur.com/HmsIB.png

Link to actual page here: bambooboss.com/pages/about-us

The "Panda Head" image under the first photo is half blacked out when viewed with Safari, latest version of iOS on my iPhone 5. While it looks quite cool, it's definitely not anything like my friend's original creative vision...

I tried another answer here on SO, where they tried surrounding all LinearGradient with <defs> tags, which I did to the current image - but to no avail...

Anyone have a clue what's going on? Is it compatibility? or did something go wrong while saving to SVG from .ai?

Ad

Answer

Change the following line to:

.st38{opacity:.08;fill:url(#XMLID_108_);}

i.e. remove the 8.00000e-02

also ... run this through an optimiser like SVGOMG ... if displayed at the small size this is far too complicated and large. Simplify all the gradients, maybe even merge them all into one. Should be able to get the ungzipped version down an order of magnitude from 35kb. Lovely logo though.

Ad
source: stackoverflow.com
Ad