PIL/Pillow doesn't support SVG. But an SVG file is just XML, so it wouldn't be impossible to "detect" an SVG file using lxml or gumbo and extract its dimensions/viewPort. You'd have to intercept the SVG before passing the image data to PIL, but it would be possible to support SVG images with the Image Wrapper plugin. What doesn't pass the SVG sniff test could then be passed on to Pillow. Just a suggestion, mind you.