Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I modified image field and I added svg as allowed extension. But when I want to create a page the svg, in the image form field svg does not appear in allowed types.
Comment | File | Size | Author |
---|---|---|---|
#6 | allow_svg_files_in_the-2541480-6.patch | 4 KB | Anonymous (not verified) |
allowed_types.png | 10.86 KB | suite117 |
Comments
Comment #1
suite117 CreditAttribution: suite117 commentedComment #2
cilefen CreditAttribution: cilefen commentedThat is not critical.
Comment #3
cilefen CreditAttribution: cilefen commentedImageWidget supports these types only:
$supported_extensions = array('png', 'gif', 'jpg', 'jpeg');
Comment #4
cilefen CreditAttribution: cilefen commentedComment #5
Anonymous (not verified) CreditAttribution: Anonymous at FFW commentedComment #6
Anonymous (not verified) CreditAttribution: Anonymous at FFW commentedHere is quick patch.
Comment #7
dmdewey CreditAttribution: dmdewey commentedI would've just used the file widget for an SVG. They are more closely related to PDF and EPS than they are to JPG, PNG or GIF.
Comment #8
Dave ReidBy GD (our default image toolkit) does not support SVG. So you cannot generate image styles of them. I think we should close this in favor of #1014816: Allow image fields to use any extensions the current image toolkit supports (instead of hard-coding jpg, png and gif only).