Image widgets block svg uploads

Created on 18 September 2023, over 1 year ago

I open this issue to track conflicts with other image widget modules that block svg uploads.

The first conflict occurs with image_widget_crop issue ( https://www.drupal.org/project/image_widget_crop/issues/3251198 💬 Allow SVG uploads in widget (svg_image compatibility) Needs work ), as I understand it, SvgImageWidget overrides ImageWidget through the svg_image_field_widget_info_alter hook.
Its formElement method adds the svg extensions in $element['#upload_validators']['file_validate_extensions'][0]
But ImageCropWidget is not aware of this and implement ImageWidget removing the svg override...

The solution provided in the issue are not viable and the fix should be on the svg_image side, maybe by altering the file_validate_extensions though another way (hook) ?

The second conflict occurs with focal point : https://www.drupal.org/project/focal_point/issues/3122722 Allow SVG uploads in widget (svg_image compatibility) Postponed , please check the issue.

🐛 Bug report
Status

Active

Version

1.16

Component

Miscellaneous

Created by

🇫🇷France O'Briat Nantes

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

Comments & Activities

Production build 0.71.5 2024