Hi @AvinashRanjan ,
You can add Image Rendition as well in the below code to get Appropriate image to display.
Here is detailed documentation.
https://experienceleague.adobe.com/en/docs/experience-manager-learn/getting-started-with-aem-headles...
Cheers,
Aditya
query($path: String!, $imageFormat: AssetTransformFormat=JPG, $imageSeoName: String, $imageWidth: Int, $imageQuality: Int) {
adventureByPath(
_path: $path
_assetTransform: {
format: $imageFormat
width: $imageWidth
quality: $imageQuality
preferWebp: true
}
) {
item {
_path
title
primaryImage {
... on ImageRef {
_dynamicUrl
}
}
}
}
}
Thanks,
Aditya Chabuku