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
- Add an SVG Image Field to a settings entity
- Add an Image Field to a settings entity
- Add some dummy data.
- dump the result.
- 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
Issue fork site_settings-3195017
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:
- 3195017-support-svg-image
changes, plain diff MR !2
Comments
Comment #3
devkinetic commentedRelevant patch from the MR: https://git.drupalcode.org/project/site_settings/-/merge_requests/2.patch
Comment #4
devkinetic commentedComment #5
scott_euser commentedThanks, this looks fine, happy to commit this in.
Comment #8
nagy.balint commentedI guess status is wrong here, should be "Fixed".