- Issue created by @isalmanhaider
- π΅π°Pakistan isalmanhaider
It seems the issue originated from the update described in Drupal 7.99 β , as detailed in this change record β .
The problem can be resolved by modifying the validation condition to include
$file->filemime != 'image/svg+xml'
, allowing SVG files to bypass the strict image checks that were causing errors. - Status changed to Needs work
2 months ago 6:27am 1 July 2024 - πΈπ°Slovakia poker10
Thanks for reporting this. I think this is something which needs to be changed in the
svg_image
module in thesvg_image_field_widget_form_alter()
function. Currently the module is altering the#upload_validators
(see here).In π Users are able to upload 0-byte images Fixed a new upload validator was added (see here):
+ $elements[$delta]['#upload_validators']['file_validate_is_image'] = array();
The module can remove the new validator to work as before.
Or you can use
hook_field_widget_form_alter
to remove it in the custom module as well.