Home > OS >  Can I use image processing from an URL in Hugo?
Can I use image processing from an URL in Hugo?

Time:03-08

The hugo documentation allows to use page and global resources to get an image. I was wondering if it's possible to get an image by an url? Something like this:

{{- $image := resources.Get "https://i.imgur.com/gZxmnyn.jpeg" -}}

CodePudding user response:

From hugo v0.91.0 you can use resources.GetRemote

source : https://github.com/gohugoio/hugo/releases/tag/v0.91.0

example:

{{ $image := resources.GetRemote "https://i.imgur.com/gZxmnyn.jpeg" }}
  • Related