Skip to content

SVG previews don't fit the preview stage (overflow or blank) #3910

Closed

Description

@AlexAndBear

Steps to reproduce

  1. Upload a large SVG (e.g. 2000×1500) and an SVG that has only a viewBox (no width/height).
  2. Open each in the file preview.

Expected

Both are scaled to fit the preview stage, like raster images.

Actual

The large SVG overflows and is cut off at the top and bottom; the viewBox-only SVG renders at 0×0, so the stage is blank (no error).

Cause

packages/web-app-files/src/components/Preview/MediaImage.vue (around lines 2–11) places the inline SVG, which uses percentage max-sizes, inside an unsized wrapper div.

Found during exploratory QA testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions