Oct 30, 10:57am

Firefox renders a top-level SVG document at its intrinsic size, so there's no built-in "fit to window" for SVGs (unlike JPEG/PNG, which get the image viewer). Options, easiest first:

1. Quick zoom (no file changes) Ctrl + - / Ctrl + + to zoom in/out, or Ctrl + 0 to reset. Not a true fit, but works for a quick look.

2. Fix the SVG itself (best if you control the file) In the root <svg> tag, remove the width and height attributes and keep viewBox, e.g.:

xml
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">

Firefox then scales it to fill the window (you can also use width="100%" height="100%").

3. Wrapper HTML (no SVG edits) Save next to the SVG and open this instead:

html
<!doctype html>
<html>
<body style="margin:0">
  <img src="yourfile.svg" style="max-width:100vw; max-height:100vh; display:block; margin:auto">
</body>
</html>

The <img> element scales SVGs automatically while preserving aspect ratio.

Alternative: open the SVG with GNOME's Image Viewer (Loupe, the default on Debian 13) — it fits images to the window out of the box and handles SVG. Right-click the file → Open With → Image Viewer, or set it as the default for SVG files.

Oct 30, 10:57am

This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.

Vibe can make mistakes. Check answers. Learn more