Page MenuHomePhabricator

rendering of SVG fails after image without `width` and `height`, however it should render the svg-elements after the PNG-image
Open, Needs TriagePublicBUG REPORT

Description

The first versions of these Commons files do not display correctly:

What happens?:
Most graphic content disappears.
The files have an image element (PNG) that is clipped and scaled. If the image element is disabled by renaming it to imagex, then subsequent graphic elements are displayed.

What should have happened instead?:
Display should be the same as a browser's.

The image elements were replaced, and the current versions of the files display correctly.

T40010

Event Timeline

Not a problem rendering an SVG file, but its PNG thumbnail

Aklapper renamed this task from SVG rendering problems to PNG thumbnails of SVG file with embedded "data:image/png;base64" not displayed correctly.Mar 22 2022, 8:39 AM

An <image -element without width=" and height=" is an undefined behaviour in SVG1.1. For SVG2.0 it is defined at https://www.w3.org/TR/SVG2/geometry.html#Sizing. Since SVG2.0 is not released, the not rendering of images is imho correct. However even if images without width=" and height=" are not allowed/defined, the rest of the SVG-elements should be rendered, that's imho the bug.

JoKalliauer renamed this task from PNG thumbnails of SVG file with embedded "data:image/png;base64" not displayed correctly to rendering of SVG fails after image without `width` and `height`, however it should render the svg-elements after the PNG-image.Mar 22 2022, 9:01 AM

As Johannes suggested, this report should be closed as invalid. The SVG 1.1 DTD says the width and height attributes are #REQUIRED. It would be better if librsvg emitted an error rather than a partial image, but that is a minor issue.