Image missing in notification

Hello, trying to get image notification working in automation. I get the notification both on my HA portal as well as android phone HA app. However I don’t see the image I am trying to include. I can see the image in my local folder on HA device.

Here is the action code for the automation

action:
  - metadata: {}
    data:
      filename: /media/local/snap.jpg
    target:
      entity_id: camera.pizero
    action: camera.snapshot
  - metadata: {}
    data:
      message: "Someone at the entrance "
      data:
        image:
          path: /media/local/snap.jpg
    action: notify.mobile_app_aadphone
  - action: notify.persistent_notification
    data:
      message: test
      data:
        image:
          path: /media/local/snap.jpg
mode: single

What could be wrong?
thanks for the help.

invalid format

https://companion.home-assistant.io/docs/notifications/notification-attachments#example-action

  - metadata: {}
    data:
      message: "Someone at the entrance "
      data:
        image: /media/local/snap.jpg
    action: notify.mobile_app_aadphone

thanks for the reply. The format is generated by UI. I did not write the yaml myself. and even if I try the example you shared, I still face the same issue. get the text notification but not the image.

ah you must be facing this issue https://github.com/home-assistant/android/issues/1672 try in the www folder