Twitter action : how to send a tweet containing an image?

Is there any simple and robust way to embed an image (either through a remote url, either from a local file - everything would be fine) allowing to publish a tweet containing an image in addition to a few text ?

(I don’t see anything around that in the twitter action :

Ok this wasn’t available in the base code (but the underlying twitter4j dependency already had the feature), so i made a pull request (

1 Like

That is an awesome feature - thank you!

Do you mind replying to this thread when/if it gets incorporated into the daily snapshot?


Sure !

Usage is just (remote or local file) :

sendTweet("Arrosage nécessaire pour la plante du salon !", "")

Actual result from OpenHAB is then :

Brilliant - can it send images in private messages too?

As far as i know, this feature is not possible at the moment, twitter is not exposing a way to attach an image to a direct message (@see So the answer is no.

How funny - wonder why they do that?

No matter, I can run openhab through a protected account and then if I post image tweets then only authorised followers will be able to see them


I’m using the exact same setup, a protected twitter account with only me as a follower !

1 Like