It looks like I have to resize an image for it to be available to the app, is that true?
For example:
{{ $portrait := resources.Get "img/portrait.jpg" }}
<img class="logo" src="{{ $portrait.RelPermalink }}"/>
It looks like I have to resize an image for it to be available to the app, is that true?
For example:
{{ $portrait := resources.Get "img/portrait.jpg" }}
<img class="logo" src="{{ $portrait.RelPermalink }}"/>
I would not think so. Do you have an error using the code above?
Is the image in your asset
directory?
There is no error but it produces a broken image tag.
The image is in the asset directory, that’s the only place I can put it that resources.Get seems to find it.
hum… Works fine on one of my project.
There is no error but it produces a broken image tag.
Are you sure of your tag syntax?
Could you try using with
:
{{ with resources.Get "img/portrait.jpg" }}
<img class="logo" src="{{ .RelPermalink }}"/>
{{ end }}
Do you have a repo somewhere we could look at ?