You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using an SVG as a featured image, build fails.
webpack 5.74.0 compiled successfully in 143 ms
Start building sites …
hugo v0.102.3-b76146b129d7caa52417f8e914fc5b9271bf56fc+extended linux/amd64 BuildDate=2022-09-01T10:16:19Z VendorInfo=gohugoio
WARNING: calling IsSet with unsupported type "bool" (bool) will always return false.
Error: Error building site: failed to render pages: render of "home" failed: "/workspaces/throw.nullreference.io/themes/hugo-theme-bootstrap/layouts/index.json:18:36": execute of template failed: template: index.json:18:36: executing "index.json" at <$featured.Resize>: error calling Resize: this method is only available for raster images. To determine if an image is SVG, you can do {{ if eq .MediaType.SubType "svg" }}{{ end }}
Built in 1627 ms
Prerequisites
Describe the issue
When using an SVG as a featured image, build fails.
root cause is here:
https://github.com/razonyang/hugo-theme-bootstrap/blob/v0/layouts/index.json#L18-L22
There should be a guard here to prevent resizing of SVG featured images.
Steps to reproduce
Use a SVG for a featured image.
Expected behavior
Should not fail-- should not attempt to resize svgs.
What operating system(s) are you seeing the problem on?
Windows, Linux
What browser(s) are you seeing the problem on?
No response
What version of theme are you using?
v0.80.
What version of Hugo are you using?
0.102.3
What version of Node.js are you using?
v14.20.0
What version of Git are you using?
2.37.3
Additional context
No response
The text was updated successfully, but these errors were encountered: