Skip to content
Snippets Groups Projects

Refactor the SvgImageWidget class to work with Drupal 10.2+

Changes:

  • Have SvgImageWidget extend ImageWidget instead of FileWidget reducing code duplication manyfold.
  • Simplify the svg_image_get_image_file_dimensions() function a whole lot, it should not need to worry about non-svg images.
  • Add a FileIsImageOrSvg constraint, so that the FileIsImage validation can be kept even if the graphics toolkit (gd in most cases) does not think that svgs are images.

Closes #3413668

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading