resources.Copy
Returns a copy of the given resource at the target path.
- Syntax
- resources.Copy TARGETPATH RESOURCE
- Returns
- resource.Resource
This works with global resources, page resources, and remote resources.
{{ with resources.Get "images/a.jpg" }}
{{ with resources.Copy "img/new-image-name.jpg" . }}
<img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
{{ end }}
{{ end }}The TARGETPATH is relative to the site root.
Last updated:
October 29, 2026
:
content: Refine callout usage across the site (711fe3a35)
Improve this page