I suspect that what I'm trying to do is either impossible, because I'm thinking about the problem wrong, or trivial but impossible to Google because of the word "view" in relation to an image.
If I inline an svg sprite built with the <view>
model, how do I reference it in <img>
elements?
Inlining the svg seems right because it saves a DNS/file retrieval round-trip, gets automatically cached at the CDN, and gets automatically gzipped. Using the <view>
model seems sensible because the html is clear, and it's easy to apply styles and aria labels and whatnot. But ... I can't figure out how to combine the two ideas.
FWIW, I control the sprite build (with gulp-svg-sprite
), so if this is actually impossible, I can choose a different mode other than <view>
, but this is my first time doing this, and <view>
seemed the easiest ... until it seemed impossible :)