Hello everyone,
I am working on a page where I took the features.html.twig template of the antimatter theme and modified it so I can put my own pictures in the icon portion:
{% if current.Photo %}
<img src="/Lab Members/{{ current.Photo }}" alt="Current Lab Member"></img>
<div class="member-content icon-offset">
{% else %}
<div class="member-content">
{% endif %}
{% if current.Name %}
<h4>{{ current.Name }}</h4>
{% endif %}
{% if current.Position %}
<p>{{ current.Position }}</p>
{% endif %}
</div>
In this case current.Photo has the name file for the picture I want it to load. The picture loads perfectly but it is not getting cached. This is not a issue when I am running my website locally but then I get errors 500 (only of a few of the pictures, and which pictures get the error varies whenever you reload) when I am running it off my hosting company. The error I was getting is that the page was using too much of the memory and couldn’t display the website. I believe that if grav cached the images I would not have problems with the memory.
Also, I have tried using twig to call out the image:
<img src="{{ page.media[current.Photo].url }}" alt="Current Lab Member"></img>
The image shows but when I check on chrome the link is not that of the cached image but of the actual picture.
Thank you for taking the time to read this, and thanks for the help.
-Juan Luis