Skip to content

Unable to display image not located in /www dir, in notification #3933

Description

@nappyjim

Home Assistant Android app version(s):

Android version(s):
14

Device model(s):
Google Pixel 7 Pro

Home Assistant version:
Supervisor: 2023.10.0
OS: 10.5
Frontend 20231002.0 - latest

Last working Home Assistant release (if known):
NA

Description of problem, include YAML if issue is related to notifications:
I am trying to attach in image to a notification. I am not able under normal circumstances to have the image be placed in the /www folder. If I DO place it in the /www folder, the picture appears on the notification.

But with the image in the folder it has to normally reside, the notification does not show the image and I get a render error in the logs.

The image will reside in /config/custom_components/mail_and_packages/images/amazon/

I have added this dir to my external allow list:

homeassistant:
  allowlist_external_dirs:
    - /config/custom_components/mail_and_packages/images/amazon

I have formatted my notification as such:

{
    "title": "",
    "message": "Picture test",
    "data": {
        "sticky": "false",
        "priority": "Normal",
        "ttl": 0,
        "tag": "picture_test",
        "color": "blue",
        "image": "/config/custom_components/mail_and_packages/images/amazon/1.jpg"
    }
}

Companion App Logs:

10-11 23:14:04.870 20164 20164 D MessagingService: Creating notification with following data: {sticky=false, tag=picture_test, color=blue, image=/config/custom_components/mail_and_packages/images/amazon/1.jpg, webhook_id=981d46d926e4a9e33795aaaaef55b8a5625a00cfb4465d9d4ae2670fdf43b2a3, message=Picture test, server_id=1}
10-11 23:14:04.877 20164 20164 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
10-11 23:14:04.877 20164 20164 D ServerConnectionInfo: Using external URL
10-11 23:14:04.880 20164 20901 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: false
10-11 23:14:04.880 20164 20901 D ServerConnectionInfo: Using external URL
10-11 23:14:05.033 20164 20901 D TrafficStats: tagSocket(115) with statsTag=0xffffffff, statsUid=-1
10-11 23:14:05.723 20164 20901 D OpenGLRenderer: --- Failed to create image decoder with message 'unimplemented'
10-11 23:14:05.732 20164 20164 D MessagingService: Show notification with tag "picture_test" and id "-785838285"
10-11 23:14:07.400 20164 20901 D LogcatReader: Read logcat for pid 20164

Screenshot or video of problem:

Additional information:
To cut down on folder nesting I even copied the image to the /config folder and tried it from there, it did not work either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions