Allow SVG uploads in widget (svg_image compatibility)

Created on 25 November 2021, about 3 years ago
Updated 28 April 2023, over 1 year ago

Problem/Motivation

The widely used SVG Image module is currently not supported anymore. When using the "ImageWidget Crop" widget on an Image field while svg_image module is activated and the extension is added to the "allowed extensions" list, the svg extension keeps from being allowed. When changing the widget back to default "Image", it works.

Steps to reproduce

  1. Install and enable svg_image module.
  2. Add an image field to an entity and add svg as allowed extension (png, gif, jpg, jpeg, svg)
  3. Set "Image" as form widget for this field.
  4. Go to the entity "add" form and notice that svg is in the allowed list, works fine.
  5. Change the form widget for this field to "ImageWidget Crop"
  6. Go to the entity "add" form and notice that svg is not in the allowed list anymore.

Proposed resolution

Add support for the svg file format and if need be bypass the crop widget (see issue #3034165 )

See similar issue for focal_point: https://www.drupal.org/project/focal_point/issues/3122722 Allow SVG uploads in widget (svg_image compatibility) Postponed

💬 Support request
Status

Active

Version

2.3

Component

Code

Created by

🇧🇪Belgium fernly

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.

Production build 0.71.5 2024