This should be simple. Here is my TWIG:
<img src="{{ page.media['thumbnail.png'] }}">
The image does not load.
I get this:
<img src="<img src=" user="" pages="" 02.home_mod="" _437y="" thumbnail.png"="">
This should be simple. Here is my TWIG:
<img src="{{ page.media['thumbnail.png'] }}">
The image does not load.
I get this:
<img src="<img src=" user="" pages="" 02.home_mod="" _437y="" thumbnail.png"="">
Nevermind. I've worked on this for hours, and as soon as I post this, I figure it out.
I should have had:
{{ page.media['thumbnail.png'] }}
I was adding more than what was necessary.
The TWIG that I am using looks more like this now:
{{ page.media[page.header.thumbnail] }}
and I've reduced it to:
{{ media[header.thumbnail] }}
Log in to reply.
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 2 | 307 | 3 weeks ago | ||
| 0 | 310 | 3 weeks ago | ||
| 0 | 263 | 4 weeks ago | ||
| 0 | 264 | 4 weeks ago | ||
| 2 | 335 | 1 month ago |