Closed (outdated)
Project:
Media Thumbnails SVG
Version:
8.x-1.0-alpha4
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Dec 2020 at 10:04 UTC
Updated:
28 Dec 2020 at 21:59 UTC
Jump to comment: Most recent
Comments
Comment #2
drubbHi,
thanks for reporting this issue. Not sure how to solve this in the module's code, because the error is thrown by the underlying php library (composer package), meyfa/php-svg. However, it's not a missing XML version tag, that should not cause any issues as you can see in this example: https://github.com/meyfa/php-svg/wiki/Reading-SVGs
Converting the SVG to a raster image is the first task in the module's media thumbnail plugin (/src/Plugin/MediaThumbnail/MediaThumbnailSVG):
SVG is the mentioned library class. BTW, in this plugin file you'll also find the mime type constraint, as annotation, it's "image/svg+xml".
If there's only a handful of svgs to be converted, try uploading them one by one in the media library, thumbnails will be generated on save. That might lead you to a file throwing this error. Then we can take a look at the file contents.
Comment #3
drubbThere's now a new dev release of this module, implementing a rasterizer fallback:
GraphicsMagick -> ImageMagick -> PHP GD
For GraphicsMagick and ImageMagick it's using the CLI tools directly, no php extensions required. There's some information on the status page about the rasterizer in use.
Please try it out. If it doesn't solve your issue, I'll need some more details:
- when does it happen (immediately or after processing x% of the files)
- are there errors when you edit and save the media entities?
- are there svgs that are completely empty?
Comment #4
barry_fisher commentedI'm working with Darren on this issue and we've progressed since this issue was created - especially given your latest dev release. Therefore, I'll close this on Darren's behalf.
Thanks @drubb!