Multiple asset containers #215
-
I'm not sure if I'm in the right place, could be that you are limited because how Statamic works. I was wondering if it's possible to add multiple containers to the Responsive field type, instead of just one container. I have a collection of products where I want to use responsive images. There's one blueprint for products, but we have certain products that can't be shown in all countries. We want to keep the assets separate as well, so |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I am afraid it is not possible. I checked Assets fieldtype docs, and in the case of multiple asset containers, you have to pick one asset container for the fieldtype. I do not have access to Statamic install as I am writing this, but I don't think you are able to have multiple containers enabled for single asset fieldtype. Responsive images fieldtype works similarly to Asset fieldtype, so right now it is not possible. I suggest try asking this question about Assets fieldtype instead, and if it ends up being possible with Assets fieldtype, you can pass Asset field value to Responsive tag, and the addon should parse that. Good luck. |
Beta Was this translation helpful? Give feedback.
You do not have to use Responsive fieldtype in your blueprints to utilize
responsive
tag, you can use Assets fieldtype. Let's say you have Assets field with handleassets_field
, then in your Antlers templates you do{{ responsive :src="assets_field" }}
and it will work too.If you can get multiple asset containers working in a single Assets fieldtype field, then passing this to
responsive
tag should work.Yes, that or joining Statamic Discord. I prefer the latter personally.