Webhook image_url showing broken link.
I am using a channel webhook to send information from my Home Assistant to MatterMost.
The trigger in Home Assistant is motion on one of my security camera. What is supposed to happen is a message saying ‘Motion detected’ along with a picture from the camera.
I would expect to see the image and message instead I am getting the message and a broken link icon. When I download the image link I do see the correct image.
Two things:
#1 I would like the image to show up in the MM channel, not a link icon.
#2 I would like the image to be inbedded in the message and not just a link to the file. This is because the file in question is frequently updated, so might not be relavent to the message at the time of reading. (This is not a show stopper if it can not happen)
The webhook code is:
curl -i --insecure -X POST --data-urlencode 'payload={“attachments”: [
{
“fallback”: “test”,
“color”: “#ff8000”,
“text”: “Picture below.”,
“author_name”: “Home Assistant”,
“author_icon”: “https://mattermost.com/wp-contect-uploads/2022/02/icon_WS.png”,
“image_url”: “http://xx.xx.xx.xx:8123/local/tmp.porch.jpg”,
“title”: “Porch Motion Detected!”
}
]
} ’ https://<<>>/hooks/<<< My Channel Key >>>>
Observations:
A) The text and the Mattermost Icon all look as I expect. Only the picture from my server is broken icon.
B) If I copy the URL from Matter Most and past it into my web browser the picture is displayed.
Questions:
Is there a limit to the size of the picture MM can handle in a webhook like this?
Done it matter that I am downloading my picture using HTTP, and not HTTPS like the MM icon?
Any assistance would be great. First time writing a MatterMost web hook…