govCMS / GovCMS8

Current stable release of the main GovCMS8 distribution.
GNU General Public License v2.0
60 stars 58 forks source link

Can not upload SVG images #214

Open gargsuchi opened 5 years ago

gargsuchi commented 5 years ago

Steps to reproduce:

Related Drupal.org issue - https://www.drupal.org/node/2220381

TobyWild commented 5 years ago

Same issue effects the ability to upload an SVG as the themes Logo image.

klonos commented 3 years ago

Noting that SVG is basically an XML/text file. As such, Drupal core (GD really) fails to apply image styles to SVG files, so doesn't produce thumbnails for the media library etc. So although it may not make sense from a non-technical point of view, the proper way to handle this would be to configure the file/document media type to allow .svg extensions - NOT the image media type.

In the case of the site logo, it would need to be implemented directly on the theme level (i.e. not via the site settings form - as that form only allow actual image files to be uploaded).

More relevant Drupal core issues:

For better SVG support, PaaS customers may install contrib modules such as:

SaaS customers would need to convince us that there is demand for this feature (we've only received 2-3 requests over the last 3 years in the GovCMS Service Desk), and they'd need to raise a feature request with the GovCMS 9 distro: https://github.com/govCMS/GovCMS/issues (noting that no new modules/features are being considered to be added till all sites in the GovCMS platform have moved from GovCMS 8 to 9).