Talk API - send image with preview

I use a chat to be informed when a movement is detected on one of the cams controlled by my home automation system.
When a movement is detected, I first upload an Image where the movement was detected with:

curl -X PUT -u user:pw https://NEXTCLOUD/remote.php/dav/files/USER/Unifi-EVA/detection.png -T /media/picture/lastDetection.png

After uploading the file I share it in the particular chat with:

curl -H ā€œContent-Type: application/jsonā€ -H ā€œAccept: application/jsonā€ -H ā€œOCS-APIRequest: trueā€ -d ā€˜{ā€œshareWithā€:ā€œchatIDā€,ā€œshareTypeā€:10,ā€œpathā€:ā€œ/detection.pngā€}ā€™ https://NEXTCLOUD/ocs/v2.php/apps/files_sharing/api/v1/shares

It works quite good however the image posted in the chat does not apear with a small thumbnail only a standard paceholder is used.
How can I upload the image to the chat with a preview?

Thx
Andy

Hey, what happens if you reload the conversation? Is the preview shown then?
Also, what happens if you manually upload the same image, does the preview work then?

https://nextcloud-talk.readthedocs.io/en/latest/chat/#share-a-file-to-the-chat

Canā€™t check right now, but shouldnā€™t there be a talkMetaData entry ?

hmm reloading helps youā€™re right strange maybe my browser needs a restart, thx