Skip to content

SVG images are not supported to be embeded in posts or as header image #132

@julian-alarcon

Description

@julian-alarcon

Describe the bug
Trying to add an svg image is not possible.
![svg-image](svg-image.svg)

To Reproduce
Steps to reproduce the behavior:

  1. Add svg image ![svg-image](svg-image.svg)
  2. Try to start the hugo server hugo server
  3. No server is booted, and error below is show:
Start building sites … 
Built in 314 ms
Error: Error building site: "/home/user/Code/my-blog/themes/hugo-theme-stack/layouts/_default/_markup/render-image.html:4:45": execute of template failed: template: _default/_markup/render-image.html:4:45: executing "_default/_markup/render-image.html" at <$image.Width>: error calling Width: *resources.genericResource is not an image

Expected behavior
A clear and concise description of what you expected to happen.

Desktop (please complete the following information):

  • OS: Ubuntu 20.04
  • Browser : Firefox/Chrome

Hugo version: Extended 0.80.0

Additional context
I use the theme https://github.com/halogenica/beautifulhugo with no issues embedding svg files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions