Featured image of post 【Hugo之路 番外5】hugo使用ico图片文件报错

【Hugo之路 番外5】hugo使用ico图片文件报错

发现 Hugo 无法使用.ico格式的图片,而直接在 windows 上修改文件名后缀为.jpg/.png仍无法使用,但是报错不一样,最终只能通过格式转换器转换后才能使用,在线的转换器也可以

  • 直接使用.ico的报错:
1
execute of template failed: template: _default/list.html:25:44: executing "main" at <$image.resource.Width>: error calling Width: *resources.genericResource is not an image
  • 直接在 windows 上修改文件名后缀后的报错:
1
execute of template failed: template: _default/list.html:29:52: executing "main" at <$image.resource.Fill>: error calling Fill: image "路径\\example.png": fill : image: unknown format
Licensed under CC BY-NC-SA 4.0
最后更新于 Apr 01, 2022 02:15 CST
comments powered by Disqus
Built with Hugo
主题 StackJimmy 设计