I have a branch of Hugo for personal use to create PNG files from SVG source files.
I’ve implemented this as a resource transformation (source). It’s very useful for me, but will probably never be good and fast enough to be merge upstream. It’s using Inkscape for now.
The source SVG asset is a generic resource. That’s because it’s not supporting the usual image operations.
The output is a PNG and could support the operations, e.g. “Resize”.
Now I wanted to use these operations on the output file, but Hugo printed
<file> is not an image (source)[https://github.com/jansorg/hugo/blob/de4d1f121e09cd7bf5d43139b9a5f52ada0dde4e/resources/transform.go#L269].
As far as I understand after digging into the sources, a transformation keeps the same type, so I can’t transform a generic resource into an image resource.
Does someone know a way how to tell Hugo that the result (i.e. the PNG) is an image resource and not a generic resource?