sphinx
sphinx copied to clipboard
Re: :scale: for SVG images in HTML builds
Describe the bug
#6696 added :scale: support for SVGs. Since then, the implementation in imagesize has changed to contain a small bug I describe in https://github.com/shibukawa/imagesize_py/issues/64. As a result, the image size is not obtained and scaling is ignored.
I'm creating this issue for the sake of visibility, in case others may encounter the same problem. I don't expect there is much to be done in the sphinx side, so feel free to close it.
How to Reproduce
Obtain an SVG file with single-quoted width/height (for example with dvisvgm). Then try to use the :scale: option
.. image:: example_image.svg
:scale: 50%
Environment Information
Platform: linux; (Linux-6.5.0-1023-oem-x86_64-with-glibc2.35)
Python version: 3.10.14 | packaged by conda-forge | (main, Mar 20 2024, 12:45:18) [GCC 12.3.0])
Python implementation: CPython
Sphinx version: 5.3.0
Docutils version: 0.17.1
Jinja2 version: 3.1.4
but I don't think `sphinx`/`docutils` versions are relevant in this case.
Sphinx extensions
No response
Additional context
No response