Maybe it’s a silly question, but I’ll ask it anyway:
– in Poster2 can I have access to srcset?–
example: {{header.image.srcset}}
How?
Maybe it’s a silly question, but I’ll ask it anyway:
– in Poster2 can I have access to srcset?–
example: {{header.image.srcset}}
How?
src or srcset?
srcset
What’s the use case? Are you are using stack based post (items)? Which are the stacks you would use inside the post item and inside the (I guess freestyle) template?
In template list, inside Coder (Source).
Used to display the Header Content Item image inside a Containr in the Grid Item. Required to set the image macro {{header.image.srcset}} as a background image.
url('{{header.image.srcset}}');
background-size: cover;
background-position: center center;
Ok. Which stack in the actual post item would generate for you the scrset attribute?
use Image Plus (Source):
animated webp (fallback) gif
animated avifs (fallback) gif
webp (fallback) jpg
avif (fallback) jpg
One option / workaround would be to use Poster’s custom metadata field to hold one of the image urls. You could then just add {{custom.metadata}}
wherever you wanted to use that value.
Unfortunately I already use it for another function.
but it’s interesting what you tell me, thanks… I could experiment something on this and modify the {{custom.metadata}} that I use now.
I’ll try to work on it, thanks…
I tried, but it’s too complicated, in the sense that having many posts afterwards, it becomes complex (at least for me).
Anyway, as you say it works, thanks.
But I should write the link in the {{custom.metadata}} every time
Those fields are really usefull.
@Jannis I wish there were more general fields that could be used for theese type of uses.
Let me check what I can do regarding srcset.