Images
Images can be used in various places throughout Homey, such as album art for speakers, camera devices and in Flows.
Last updated
Was this helpful?
Images can be used in various places throughout Homey, such as album art for speakers, camera devices and in Flows.
Last updated
Was this helpful?
When an Image
is created, it needs a way of providing Homey with its data. This can be either:
an URL, available from anywhere on the internet
a binary stream through the getStream
method
a local path to a static image which is shipped with the App.
Note: Images are limited to 5 MB.
URLs should be used when the image is available publicly on the internet.
Paths should be used when the image is locally available.
It is also possible to consume an image in your app, for instance through use of Flow Tokens.
Streams should be used when downloading an image that cannot be supplied using . Using image streams involves writing data directly into a Node.js stream. Using streams requires homey version 2.2.0 or higher.
Call when the image has been updated, and the front-end will download the image again.
When your image uses a Stream, the method provided in will be called again.
At any time, you can switch between delivery type by calling , or .