Athom reached out to me with an update on this issue and have provided me with a work-around. It allows you to refer to images in the Gallery app, without its reference changing after every Homey reboot.
It requires some steps, but you only have to do them once per image.
In order to get a permanent image reference:
- Access you Homey via the web app;
- Open the image library in the Gallery app (Settings (cogwheel) > Gallery app > Settings);
- Right click the image, for which you want to obtain the image reference, and select the
Inspect option in your browser. Note that I am using Chrome, but assume other browsers have a comparable inspection option;
- The Inspect window opens and highlights the HTML section of the selected image;
- In the HTML code you’ll find an
url tag followed by a relative path and image name;
- The image name is everything after the
../userdata/ part, including the extension (c33592b7-6915-4291-8970-2273f30a1dff.png in the example).
The direct reference to the image is the combination of your Homey’s local path to the user data folder in the Gallery app and the image name (including extension).
You can use either of the following options for the said path:
https://X-X-X-X.homey.homeylocal.com/app/com.athom.gallery/userdata/
https://homey-YOUR_HOMEY_ID.local/app/com.athom.gallery/userdata/
http (without the s) also works. The second option requires a cloud connection (to resolve your local IP-address), the first is a local reference, hence preferred.
The Xs represent the octets of your Homey’s local IP address. If, for example, your Homey’s IP address is 192.168.1.100, then the image reference would become:
https://192-168-1-100.homey.homeylocal.com/app/com.athom.gallery/userdata/c33592b7-6915-4291-8970-2273f30a1dff.png
Personally, I have put the path and image name in separate variables for easy reference.
EDIT - Regarding the path: the above path options only work when accessing your Homey locally; not when accessing Homey remotely. The solution is to use the relative path when referring to the images: /app/com.athom.gallery/userdata/. Then it does not matter whether you access your Homey on your local network or remotely; the images are displayed in both scenarios.