Unable to use EntityBrowser with SVG images because image extensions are hard-coded.

Created on 9 January 2018, over 6 years ago
Updated 5 January 2024, 6 months ago

Didn't test with upload widget but with 'View' widget we cannot select SVG images because the image extensions are hardcoded in the validate function of the 'View' 'FieldWidget'.

Usecase: Install https://www.drupal.org/project/svg_image β†’ so image fields can support SVG images. Go through your image fields and update the extensions to include SVG. Then try creating a node or an Image entity with SVG. Using the default image widget works fine. But using the EntityBrowser View widget throws an error on selecting the SVG because of the hardcoded extensions in the validate function.

Should we let the the extensions settings of the field dictate what type of images could be added using EntityBrowser and EntityBrowser was not opinionated?

πŸ› Bug report
Status

Needs review

Version

1.4

Component

Widget plugins

Created by

πŸ‡¨πŸ‡¦Canada pavlosdan

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

Merge Requests

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.69.0 2024