654 B
654 B
title, description, categories, params
| title | description | categories | params | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| resources.Copy | Copies the given resource to the target path. |
|
{{ 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 server root. A leading slash is optional and has no effect.
Note
Use the
resources.Copyfunction with global, page, and remote resources.