Closed tremby closed 2 years ago
Or am I better off not allowing plain images, and instead using a Vizy Node with an asset field?
Added support to query asset
on a VizyNode_Image
for the next release. This will allow you to query everything you'd normally do on an asset element. To get this early, change your verbb/vizy
requirement in composer.json
to:
"require": {
"verbb/vizy": "dev-craft-3 as 1.0.13",
"...": "..."
}
Then run composer update
.
Thank you. I can only use the Craft 4 version at present; I hope this'll make it into that before too long.
Added in 2.0.0-beta.4
What are you trying to do?
Render good HTML for images coming back from the wysiwyg field.
What's your proposed solution?
Right now after selecting all possible fields in the query for
VizyNode_Image
I only get data such as this:Whereas I want things like
srcset
So what I'd really like is a link through to the associated
AssetInterface
object, where I could query for any of those things I need.I think the
id
which I see there as98
withinattrs
is in fact the asset ID, so I could in theory make another query after getting this response. But it would be much cleaner and faster to get everything I need in one query.