-
We are in the process of migrating a rather unwieldy site from Statamic 2.11.21 to the latest version. This may be a silly question and not necessarily Statamic related but in one of my older templates I have a snippet like this for an image:
How would I achieve this in Statamic 3? Is there a built in way to do this or do I need an addon? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I assume your field is named In that case, you can drop the Also, re-pass the
|
Beta Was this translation helpful? Give feedback.
-
@jasonvarga Thanks! That got me pointing in the right direction. If I do it the way you suggest this is what I get rendered out: If instead I do:
then everything works as expected. Thoughts? I will say that this is a partial and the image is part of a replicator field. |
Beta Was this translation helpful? Give feedback.
@jasonvarga Thanks! That got me pointing in the right direction. If I do it the way you suggest this is what I get rendered out:
<img src="/[{}]" srcset="/[{}] 1x,/[{}] 2x" class="c-feature-secondary__tile-image" alt="">
If instead I do:
then everything works as expected. Thoughts? I will say that this is a partial and the image is part of a replicator field.