zamb
June 8, 2021, 7:11am
1
Have a possibility to add an image from the Media Browser (not available under www-root for unauthenticated users). A similar integration as when we can add a Media Browser image to an notification-message via the URL: /media/local/image.jpg
Some magic needs to be done to get the auth-token applied to the URL i guess.
See my thread here:
I have a jpg-file in the Media Browser. In an notification for iOS I can attach the image like this:
data:
attachment:
content-type: jpeg
url: /media/local/snapshots/camera.jpg
I have tried some various ways to display camera.jpg in a Picture card. But I maybe donāt get the right syntax. Please advice!
This gives a 401 response, forbidden:
media/local/snapshots/camera.jpg
How to āaddā the auth-token?
linusk
(Linus)
March 14, 2022, 11:05pm
2
With all the recent improvements to the media library and allowing media uploads via the frontend, would love to see this implemented!
3 Likes
alexborro
(Alex Borro)
July 29, 2022, 1:39pm
3
Iām also trying to display an image from /media to a lovelace card but I miserably failed. Is this still not possible ???
pacorain
(Austin "Paco" Rainwater)
October 9, 2022, 2:19pm
4
Looks like this isnāt possible yet.
Iām trying to find a way to set up a picture entity card using an image that can only be obtained if the user is authenticated. Using the media_source:// URI scheme described in Media Source docs doesnāt work. My browser makes the request, and returns an error:
GET media-source://media-source/local/kids_room.jpeg net::ERR_UNKNOWN_URL_SCHEME
Iāve also tried the URL that the image is loaded from when I open the image in the media browser, but without the authentication token (which is only short lived, and coding that in would be a bad idea anyway), it wonāt load.
GET http://10.0.1.2:8123/media/local/kids_room.jpeg 401 (Unauthorized)
Iāve not really been able to hack together any solution so far that doesnāt involve putting the image in a public folder that can be accessed without any authentication.
2 Likes
This needs to be looked at.
Seeing a dashboard already requires a user to login, so access to media folder should be granted by such action. That means files from media folder should be possible to be linked to a dashboard card.
Forcing all files to be hosted from public www folder is a security concern.
1 Like
This needs to be added to the top of the next WTH list.
luixal
(Luis Alberto PĆ©rez GarcĆa)
September 12, 2023, 9:26am
8
I just reported this as a bug in github as what the docs explain is not working. Feel free to put some love there
opened 09:25AM - 12 Sep 23 UTC
integration: media_source
### The problem
The Media Source integration is not working at all.
There ar⦠e many threads in the community forum full of users trying to use it with no luck. Trying as per docs instructions does not allow to show images in dashboards.
### What version of Home Assistant Core has the issue?
core-2023.9.1
### What was the last working version of Home Assistant Core?
_No response_
### What type of installation are you running?
Home Assistant OS
### Integration causing the issue
Media Source
### Link to integration documentation on our website
https://www.home-assistant.io/integrations/media_source/
### Diagnostics information
Maybe some details from the community forum are interesting, like this one:
> Iām trying to find a way to set up a picture entity card using an image that can only be obtained if the user is authenticated. Using the media_source:// URI scheme described in [Media Source docs 24](https://www.home-assistant.io/integrations/media_source/#playing-media-from-a-media-source) doesnāt work. My browser makes the request, and returns an error:
>
> GET media-source://media-source/local/kids_room.jpeg net::ERR_UNKNOWN_URL_SCHEME
> Iāve also tried the URL that the image is loaded from when I open the image in the media browser, but without the authentication token (which is only short lived, and coding that in would be a bad idea anyway), it wonāt load.
>
> GET http://10.0.1.2:8123/media/local/kids_room.jpeg 401 (Unauthorized)
> Iāve not really been able to hack together any solution so far that doesnāt involve putting the image in a public folder that can be accessed without any authentication.
### Example YAML snippet
_No response_
### Anything in the logs that might be useful for us?
_No response_
### Additional information
_No response_
1 Like
birdwing
(Aron Brown)
April 16, 2024, 1:25pm
9
I had this same issue but another solution was found elsewhere on the forums:
So I finally got around to investigate this some more and I finally found a solution.
Quick Recap: The Picture Elements documentation tells us that to use locally hosted image we have to use hosting .
[grafik]
However if we follow that advice the file is accesible for the whole internet without authentication!
I want to have a detailed 3D floor plan of my appartment in a picture elements card like the many awesome examples displayed in this thread . And call me crazy, but I donāt want you weirā¦
The used the Local File integration, to setup the image as a āCameraā then used the camera_image in the picture elements card instead.
Itās a little extra setup, but it keeps the file from needing to be publicly accessible or using a custom integration.
Iām wondering if something similar can be used for notifications.
duittenb
(Dirk)
June 16, 2025, 1:52pm
10
Example: Localfile entity ālastdoorbellringā with /media/camera/frontdoor-bell.jpg
I came to the same solution but cannot figure out when the image shown through the Localfile integration is updated. Sometimes it seems to run 2 or 3 doorbells ābehindā
karwosts
(karwosts)
July 29, 2025, 2:18pm
11
Iāve added a first round of support for this in next release (2025.8)
dev ā karwosts:picture-card-media
opened 02:54PM - 25 Jul 25 UTC
## Proposed change
Allow picture card to serve image paths in the form of:
ā¦
```
type: picture
image: media-source://media_source/local/test.jpg
```
It just needs an extra step to resolve the authentication signature from the media_source API.
This is pretty barebones at the moment, and I would eventually plan to do more, including:
- Work out a visual editor for this with a media browser
- Add similar logic to `<hui-image>` (for picture-entity, picture-elements, etc)
- Maybe convert hui-picture-card to use hui-image?
But I don't see that any of those tasks necessarily need to be blocking.
## Type of change
- [ ] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [x] New feature (thank you!)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
## Example configuration
```yaml
```
## Additional information
- This PR fixes or closes issue: fixes #
- This PR is related to issue or discussion:
https://community.home-assistant.io/t/wth-bundled-cards-cannot-access-media-source/804323
https://community.home-assistant.io/t/wth-i-cant-add-a-picture-from-media/815130
https://community.home-assistant.io/t/show-a-picture-in-a-seperate-dashboard-from-media-foldername/914133
https://community.home-assistant.io/t/use-picture-from-media-in-dashboard/904393/8
https://community.home-assistant.io/t/possibility-to-add-image-from-media-browser-on-picture-card/314201/10
- Link to documentation pull request:
## Checklist
- [x] The code change is tested and works locally.
- [x] There is no commented out code in this PR.
- [ ] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated for [www.home-assistant.io][docs-repository]
[docs-repository]: https://github.com/home-assistant/home-assistant.io
For the moment itās limited to picture card only, and it doesnāt have a good UI yet, but will continue building it out a little more in the editor and other cards in future updates.
2 Likes
markaggar
(HassMan)
September 23, 2025, 12:24am
12
2 Likes