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