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.

CommentFileSizeAuthor
#6 allow_svg_files_in_the-2541480-6.patch4 KBAnonymous (not verified)
allowed_types.png10.86 KBsuite117
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

suite117’s picture

Title: Allowed types doesn't change in image field » Allowed types SVG in image field does not appear
cilefen’s picture

Priority: Critical » Normal

That is not critical.

cilefen’s picture

Title: Allowed types SVG in image field does not appear » Allow SVG files in the image widget
Component: file.module » image.module
Category: Bug report » Feature request
Issue tags: -file, -image upload

ImageWidget supports these types only:

$supported_extensions = array('png', 'gif', 'jpg', 'jpeg');

cilefen’s picture

Issue summary: View changes
Anonymous’s picture

Assigned: Unassigned »
Anonymous’s picture

Assigned: » Unassigned
Status: Active » Needs review
FileSize
4 KB

Here is quick patch.

dmdewey’s picture

I 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.

Dave Reid’s picture

By 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).