I used the following SVG code in my AMP site and it is not working:
<image style="overflow:visible;" width="324" height="180"
xlink:href="data:image/jpeg;base64, /9j/4AAQSkZ....">
--html</image>
I need AMP to use SVG files in a bigger project I am working on:
http://flexedd-amp-2.azurewebsites.net/IssuesContent/WRI/Mitigation_Goal_Executive_Summary/pages/4-09-v/Page-1-4-09-V.svg
At the moment I have to use the SVG files as SVG images in a AMP-HTML document like this example: http://www.flexedd.com/#amp
As you can see from: https://github.com/ampproject/amphtml/issues/496 SVG support is provided by specifically whitelisting attributes. If you take a look at this line from the validator's configuration: https://github.com/ampproject/amphtml/blob/master/validator/validator.protoascii#L912 you'll that see that AMP doesn't currently allow embedding external resources.
If you want the SVG <image>
element to be supported then you should join in the discussion on this Github issue: https://github.com/ampproject/amphtml/issues/96 although it's likely that the project would only support images that are being loaded locally.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With