Well, that's probably not going to work in practice though because site owners have no way of knowing what type of image a given avatar will turn out to be. We need to somehow set a size because site owners may not be setting the "height" and "width" attributes on their <img> tags.
(Also we need to produce square images, regardless of what users upload, hence the cropping.)
So I think we need:
- a way to "squarify" uploaded SVGs (some kind of cropping?)
- a way to specify dimensions inside the SVG so that browers display the correct size
- a way to validate uploaded files (xml validator with a schema definition?)
And optionally (but would be very nice):
- how do we optimise / minify SVGs? At the very least we could strip out comments. Can they be gzipped?
Well, that's probably not going to work in practice though because site owners have no way of knowing what type of image a given avatar will turn out to be. We need to somehow set a size because site owners may not be setting the "height" and "width" attributes on their <img> tags.
(Also we need to produce square images, regardless of what users upload, hence the cropping.)
So I think we need:
- a way to "squarify" uploaded SVGs (some kind of cropping?)
- a way to specify dimensions inside the SVG so that browers display the correct size
- a way to validate uploaded files (xml validator with a schema definition?)
And optionally (but would be very nice):
- how do we optimise / minify SVGs? At the very least we could strip out comments. Can they be gzipped?