I was going to say... try this out - I've put a 'jpg' on my server for you to try.
msg.payload = { chatId: "xxxxxxxxxxxx",
type:"photo",
content:"http://resources-area.co.uk/pics_of_places/san_francisco.jpg",
caption:"Picture from the front camera"};
return msg;
Is there still a way to save the picture first? because I want to take a picture when there is movement, but only send it if the door contact opens later ... for that I would have to save the picture first and then retrieve it?
Depends where the image is located.
In my last posting the image is on a server.
If it was located in your Pi then you could use (for example)...
content: "/home/pi/myImages/filename.jpg",
As Steve said... there are many ways to 'store' your image.
On my home security system I have four RPi-Zero-Ws each fitted with a Pi camera and an infrared detector. Whenever infrared is detected the RPi-Zero-W sends the captured image to an FTP server running on my main RPi-4B which then sends the image via Telegram to my mobile phone.