Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Svg images in page bundle #413

Closed
domw95 opened this issue Dec 11, 2022 · 0 comments · Fixed by #427
Closed

Svg images in page bundle #413

domw95 opened this issue Dec 11, 2022 · 0 comments · Fixed by #427
Labels
bug Something isn't working

Comments

@domw95
Copy link

domw95 commented Dec 11, 2022

What happened?

Including an SVG from a page bundle results in an error due to use of Resize method on none raster image. The image can be included fine from static.

Theme version

v2.4.2

Hugo version

v0.108.0

What browsers are you seeing the problem on?

No response

Relevant Hugo log output

"/tmp/hugo_cache/modules/filecache/modules/pkg/mod/github.com/jpanther/congo/v2@v2.4.2/layouts/_default/_markup/render-image.html:21:14": execute of template failed at <.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 }} 

/tmp/hugo_cache/modules/filecache/modules/pkg/mod/github.com/jpanther/congo/v2@v2.4.2/layouts/_default/_markup/render-image.html:21:14:

        class="my-0 rounded-md"
        srcset="
          {{ (.Resize "330x").RelPermalink }} 330w,
          {{ (.Resize "660x").RelPermalink }} 660w,
          {{ (.Resize "1024x").RelPermalink }} 1024w,
@domw95 domw95 added the bug Something isn't working label Dec 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant