Image fields don't work in velocity with dotAssets
- Create a content type
testing- Title
- Image (Image Field)
- Create a content object of
testing- use DnD to upload a dotAsset to the field - run this against your dotCMS instance and you can see that the velocity content object is unable to use/retrieve the image field.
curl -u [email protected]:admin -XGET https://demo.dotcms.com/api/vtl/dynamic/ \
-H "Content-Type:text/plain" \
-d '
#set($test = $dotcontent.pull("+contentType:testing", 100,"").get(0))
fails: $test.image
fails: $test.getRaw("image")
works: $test.contentObject.image
'
Output:
fails: $test.image
fails: $test.getRaw("image")
works: fbdf777876229e952939a9dff93c3932
Bonus crappiness - the info is messed up for the image field as well:

dupe: #22702
PR: #22710
console output

broken img url
the console is good
the img url in the UI is broken if it is Not published, but after the content is published the url is working
*the Title is undefined after being published

@wezell is that expected?
here is the fix for the displayed title https://github.com/dotCMS/core/pull/22831
I also verified that the VTL renders the expected values that were not present before
Even though Alfredo's question above is valid and probably an issue, that was not the point of the original card. Passing for now and we can revisit in the future.
Internal QA: The problem with the title has been fixed:

and after running the curl test I get this output that is expected:
curl -u [email protected]:2#GemAb?DsHzp8my -XGET http://localhost:8080/api/vtl/dynamic/ \
> -H "Content-Type:text/plain" \
> -d '
> #set($test = $dotcontent.pull("+contentType:testing", 100,"").get(0))
> fails: $test.image
> fails: $test.getRaw("image")
> works: $test.contentObject.image
> '
fails: com.dotcms.rendering.velocity.viewtools.content.BinaryMap@7a64a7e5[name=isalnds-french-polynesia.jpeg,size=100.4 K,rawUri=/contentAsset/raw-data/2a4fb69a-1f79-4bef-be47-20dec8669c78/asset,resizeUri=/contentAsset/image/2a4fb69a-1f79-4bef-be47-20dec8669c78/asset/filter/Resize,thumbnailUri=/contentAsset/image/2a4fb69a-1f79-4bef-be47-20dec8669c78/asset/filter/Thumbnail,file=/Users/nollymarlonga/workspace-dotcms/tomcat9/webapps/ROOT/assets/8/d/8d429bc7-8b44-49fb-9e3b-8f1689a64480/asset/isalnds-french-polynesia.jpeg]
fails: com.dotcms.rendering.velocity.viewtools.content.BinaryMap@7a64a7e5[name=isalnds-french-polynesia.jpeg,size=100.4 K,rawUri=/contentAsset/raw-data/2a4fb69a-1f79-4bef-be47-20dec8669c78/asset,resizeUri=/contentAsset/image/2a4fb69a-1f79-4bef-be47-20dec8669c78/asset/filter/Resize,thumbnailUri=/contentAsset/image/2a4fb69a-1f79-4bef-be47-20dec8669c78/asset/filter/Thumbnail,file=/Users/nollymarlonga/workspace-dotcms/tomcat9/webapps/ROOT/assets/8/d/8d429bc7-8b44-49fb-9e3b-8f1689a64480/asset/isalnds-french-polynesia.jpeg]
works: 2a4fb69a-1f79-4bef-be47-20dec8669c78
Fixed, tested on release-22.09 // Docker // FF
Following the provided steps I'm getting the same results that the @nollymar's comment