resource: Fix SVG and similar resource handling
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 27 Feb 2018 17:29:15 +0000 (18:29 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 27 Feb 2018 17:29:15 +0000 (18:29 +0100)
commitba94abbf5dd90f989242af8a7027d67a572a6128
treeeb9bd09e1ac8c38a551cec0b5f681ca0d8bef0b0
parent55fb0eac2019cfa22d0e6a9770d36a14be8e4d99
resource: Fix SVG and similar resource handling

The validation of if we could process the image (resize etc.) was moved up in Hugo 0.37, which meant SVG and other "non-processable" images would fail.

This commit fixes that by creating a regular resource for these image formats. They will not have `.Resize` or any of the other image methods.

Fixes #4455
resource/image_test.go
resource/resource.go
resource/testdata/circle.svg [new file with mode: 0644]
resource/testhelpers_test.go