Problem/Motivation

Issue with additional image format support for block field image.
Does not support adding additional image extensions.
Values are hardcoded at:
https://git.drupalcode.org/project/svg_image/-/blob/8.x-1.x/src/Plugin/F...
Line 185
// If not using custom extension validation, ensure this is an image.
$supportedExtensions = ['png', 'gif', 'jpg', 'jpeg', 'svg'];

Steps to reproduce

Enable additional image formats from image toolkit, add a new or edit exiting image field for block. The new extension will not be enabled for the image field.

Comments

joshua1234511 created an issue. See original summary.

joshua1234511’s picture

Added a patch for the fix.
The supported extensions an are fetched from the core image factory and the required svg format is added for the same.

joshua1234511’s picture

Status: Active » Needs review

Setting Status to Needs review

joshua1234511’s picture

manojithape’s picture

Assigned: Unassigned » manojithape
manojithape’s picture

Verified and tested patch#2. Patch applied successfully and looks good to me.

Testing Steps:

  1. Install svg image module
  2. Go to Extend-> Search "svg image" and install module. add a new or edit existing image field for the block with supported SVG extension.
  3. Observe user is not able to upload the .svg extension image file
  4. Apply patch and again try to upload an image file with a .svg extension and verify a user is able to upload a .svg image.

Testing Results:
Now the user is able to upload a newly added extension image in the image field i.e. a .svg extension.

Moving this ticket to RTBC.

manojithape’s picture

Status: Needs review » Reviewed & tested by the community
manojithape’s picture

Assigned: manojithape » Unassigned
imyaro’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

It was fixed in the different issue.
Thank for your help!