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.
Problem/Motivation
In the 2.0.x branch, SVG image field provides support for the core Media Library. That said, it still requires manual configuration, for example to set up a new Vector Image media type.
Proposed resolution
Provide default configuration (perhaps in a submodule) to implement this directly, so site builders can get this functionality up and running quickly, and also provide a reliable "known good" configuration to assist in troubleshooting and support.
Remaining tasks
- Configure a media type with all known best practices
- Export the configuration
- Create a submodule, with the configuration in a
config/install
directory
Comment | File | Size | Author |
---|---|---|---|
#10 | svg_image_field-media_bundle-3187471-10.patch | 8.5 KB | mandclu |
Comments
Comment #2
Arthur Lichtenberger CreditAttribution: Arthur Lichtenberger commentedI am a professor putting together a multi-school user facility operations plan in the time of Covid. I would like to use SVG vector image files on the user sign-up webpage. But when I go to insert such a file, its not supported. Is there a setting I could change to allow this? Note, these images come from Autocad floor plans (of large regions), output to PDF and scaled down to small size while maintaining crisp image boundaries. Saving as SVG keeps the crisp look, saving at a png, jpeg etc makes everything blurry.
Comment #3
mandclu CreditAttribution: mandclu at Northern Commerce commentedCould you upload a sample file? I just want to rule out that the problem is in how the files are being saved,
Comment #4
mandclu CreditAttribution: mandclu at Northern Commerce commentedFirst attempt at providing a pre-made media bundle in a submodule.
Comment #5
mandclu CreditAttribution: mandclu at Northern Commerce commentedComment #6
mandclu CreditAttribution: mandclu at Northern Commerce commentedRealized I had an illegal character in the info.yml file. Here's an updated patch.
Comment #7
mandclu CreditAttribution: mandclu at Northern Commerce commentedComment #8
mandclu CreditAttribution: mandclu at Northern Commerce commentedUpdated patch, to improve some issues identified during testing. In particular, it's recommended to install the Medial Library before the submodule, if the two will be used together.
Comment #9
mandclu CreditAttribution: mandclu at Northern Commerce commentedApostrophes in yml files are tricksy.
Comment #10
mandclu CreditAttribution: mandclu at Northern Commerce commentedOnce more with feeling.
Comment #12
mandclu CreditAttribution: mandclu at Northern Commerce commentedMerged in what we have so far, hopefully can refine further as necessary based on feedback.