Problem/Motivation

Just as we load entity data of type file and image, we should also add in support for the svg image fields.

On a few sites we use site settings to allow our users to upload social media icons as svg. We do this by way of the SVG Image Field module. It works great! Only issue is you have to patch support in.

With that said, I have included a dead simple patch for support below. On a side note, adding a bulleted list of this feature and supported fields would be very helpful for newcomers.

Steps to reproduce

  1. Add an SVG Image Field to a settings entity
  2. Add an Image Field to a settings entity
  3. Add some dummy data.
  4. dump the result.
  5. Observe that the file entity is not loaded for SVG.

Proposed resolution

Patch in support

Remaining tasks

  • Provide patch
  • Update Documentation

User interface changes

None

API changes

None

Data model changes

None

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

devkinetic created an issue. See original summary.

devkinetic’s picture

devkinetic’s picture

Status: Active » Needs review
scott_euser’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, this looks fine, happy to commit this in.

  • scott_euser committed 89b218b on 8.x-1.x
    Issue #3195017 by devkinetic: Support SVG Image Field
    

nagy.balint’s picture

Status: Reviewed & tested by the community » Fixed

I guess status is wrong here, should be "Fixed".

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.