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.
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.
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.