mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 20:13:32 +01:00
SVG images that rely solely on a viewBox attribute (without explicit width/height) could not be zoomed in the image preview because they have no intrinsic dimensions. CSS zoom had no effect since the SVG would simply re-render to fill whatever container size it was given. - Set explicit minWidth/minHeight on the image element when naturalWidth/naturalHeight are 0, giving CSS zoom concrete pixel dimensions to scale - Handle firstZoom() division by zero when naturalWidth is 0 by defaulting to scale 1x - Clear explicit dimensions when returning to scale-to-fit mode Fixes #240638
Media Preview
Notice: This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled.
Features
This extension provides basic preview for images, audio and video files.
Supported image file extensions
.jpg,.jpe,.jpeg.png.bmp.gif.ico.webp.avif
Supported audio formats
.mp3.wav.ogg,.oga
Supported video formats
.mp4(does not supportaacaudio tracks).webm(vp8 only)