diff --git a/content/en/hugo-pipes/introduction.md b/content/en/hugo-pipes/introduction.md index c551dad61..6e4cd76fb 100755 --- a/content/en/hugo-pipes/introduction.md +++ b/content/en/hugo-pipes/introduction.md @@ -124,10 +124,19 @@ Remote resources fetched with `resources.GetRemote` will be cached on disk. See `resources.Copy` allows you to copy almost any Hugo `Resource` (the one exception is the `Page`), possibly most useful for renaming things: ```go-html-template -{{ $resized := $image.Resize "400x400" | resources.Copy "images/mynewname.jpg" }} - +{{ with resources.Get "img/a.jpg" }} + {{ with .Resize "300x" }} + {{ with resources.Copy "img/a-new.jpg" . }} + + {{ end }} + {{ end }} +{{ end }} ``` +{{% note %}} +The target path must be different than the source path, as shown in the example above. See GitHub issue [#10412](https://github.com/gohugoio/hugo/issues/10412). +{{% /note %}} + ## Asset directory Asset files must be stored in the asset directory. This is `/assets` by default, but can be configured via the configuration file's `assetDir` key.