[5.x] Provide compatibility with SVG image module

Created on 4 July 2022, over 2 years ago
Updated 14 June 2023, over 1 year ago

It would be great if this module worked with the SVG Image module linked below. The only use case I'm struggling with right now is when I want to show an image field that accepts svgs with the photoswipe formatter, but currently it shows any SVGs as full width/height.

✨ Feature request
Status

Needs work

Version

5.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States w01f

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.

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica
  • Here is a dirty (CSS) workaround to prevent (end)users from running into this. Otherwise the user will see an error message in the PSWP layer.

    // Quickfix for the missing Photoswipe / PSWP SVG support
    // Make the link not clickable.
    // See: https://www.drupal.org/project/photoswipe/issues/3294118
    a.photoswipe:has(.no-image-style),
    a.photoswipe:has(img[src*=".svg"]) {
      pointer-events: none;
    }
    
Production build 0.71.5 2024