Hi @randeep_virk,
In Local SDK, the ImageRef._dynamicUrl field is not populated (it’s provided by Asset Delivery, which only works in the cloud env after it’s configured). When you query:
image {
... on ImageRef { _dynamicUrl }
}
the resolver can’t produce a Dynamic Media/Asset-Delivery URL locally, so the field comes back null - even though your image property is set correctly (you can see the path stored at /content/dam/securbank/pages/sb-home.png in CRXDE).
Here is what you can do:
Local SDK (recommended)
Query the fields that are available locally and build the URL yourself:
items {
image {
... on ImageRef {
_path
_id
_name
_mimeType
_authorUrl
}
}
title
content { plaintext }
}
-
Use _authorUrl in local dev, or construct a URL from _path
(e.g., https://localhost:4502${_path} for author, or your dispatcher/publish host when testing publish).
Cloud environment
If you want _dynamicUrl:
-
Configure Asset Delivery (Tools → Assets → Configuration) for your cloud env.
-
Publish the asset, the content fragment, the model, and the GraphQL endpoint.
-
Then the same query with _dynamicUrl will return a value.