Implementation Details :-
1. In Content Fragment Model Editor we are using Content Reference with type Image.
2. Now using this model we have added path to image.
3. Its getting stored in correct manner in crx/de.
4. Graph QL Query returning null.
Note - Its AEM as CS Local set up.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
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
# if available in your SDK build:
_authorUrl # often works locally; use this directly
# _publishUrl # works when the asset is published in a cloud env
}
}
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.
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
# if available in your SDK build:
_authorUrl # often works locally; use this directly
# _publishUrl # works when the asset is published in a cloud env
}
}
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.
Thanks , ITS Working Now !! @SantoshSai
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies