tkimnguyen
(T. Kim Nguyen)
August 29, 2017, 6:44pm
1
Is there a way to specify a relative path for an SVG image in a Diazo theme?
According to https://stackoverflow.com/questions/12748197/svg-code-in-plone-page I tried this:
<object data="https://2017.ploneconf.org/++theme++ploneconf2017-kim-20170829/image.svg" type="image/svg+xml"></object>
and it works but it doesn't if I try to set the data attribute to use a relative path, e.g. ./image.svg or ../image.svg or /image.svg or even just image.svg
cdw9
(Chrissy Wainwright)
August 29, 2017, 6:58pm
2
Did you try including the absolute path prefix?
<object data="/++theme++ploneconf2017-kim-20170829/image.svg" type="image/svg+xml"></object>
tkimnguyen
(T. Kim Nguyen)
August 29, 2017, 7:20pm
3
I did not... but I would also like to avoid having to hardcode the theme name...
tkimnguyen
(T. Kim Nguyen)
August 29, 2017, 7:23pm
4
Oh geez, this works:
<img src="image.svg" title="bla" alt="bla">
[hides head in shame]