Last modified: 2010-05-15 15:38:44 UTC
SVGs are not resized down to fit on Image: pages. They are rendered at their normal size, and then placed on the page with the width="800" (or whatever your setting is) attribute set in the image tag, meaning they are only rescaled by the browser. This is beacuse mustRender() (Image.php) returns true for SVG, hoever simply adding "image/SVG" to this list of types that return false in this function does not fix the problem, as this causes the SVGs to render to the wrong path. My hack invovled changing line 171 of ImagePage.php from: if ( !$this->img->mustRender() && ( $width != $this->img->getWidth() || $height != $this->img->getHeight() ) ) { to: if ( (!$this->img->mustRender() || $this->img->getMimeType() == 'image/svg' ) && ( $width != $this->img->getWidth() || $height != $this->img->getHeight() ) ) { which solves the problem, but is it a bit ugly.
I've simply removed the mustRender() check here as it doesn't serve any apparent purpose.