Fix image preview within Media Library modal

Created on 14 August 2021, over 3 years ago
Updated 21 September 2023, about 1 year ago

The changes in #3053018: Fix previews of SVGs that have no width / height attribute successfully improved the display of the preview image when adding SVG images directly to the media library, but does not appear to size the image when added through the media library overlay.

Feature request
Status

Postponed: needs info

Version

2.2

Component

Code

Created by

🇨🇦Canada mandclu

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇪🇨Ecuador jwilson3

    The Claro admin theme doesnt exhibit any problems here because of the responsive img css styles in elements.css:

    img {
        max-width: 100%;
        height: auto;
    }
    

    I'm tempted to close this as outdated unless someone can provide steps to reproduce using an admin theme, e.g., one that doesn't support responsive images out of the box maybe??? And even in that case, the proper fix will require creating an upstream issue on the admin theme's queue to support responsive images in the Media Library preview form widget. :)

    I'm almost 100% certain we do not want to get into display inline SVGs in this preview form, as the current MR approach takes.

Production build 0.71.5 2024