Media in HA - A confusing mess?

That’s not a clickbait heading - I genuinely think media in HA is a confusing mess, but I’m here to be told it isn’t and why.

It seems to me that there are fundamentally two places to store media in HA. The /media folder at the same level as /config and anywhere in /config/www.

First of all why?

Secondly, why do neither of them appear to allow the media to be used in all circumstances?

I’ll give a couple of examples, but there are many more.

Choosing Media from the sidebar takes you here:

‘Camera’ - I get. It simply opens a view on all cameras.
‘Image’ - What exactly is that? Currently it contains a QR code for my WiFi that was created by my Unifi integration and it is actually an image entity. Which is all fine (I guess), but is a confusing folder name.
‘Image upload’ - Again, what is this? Mine is empty and the offer to ‘Manage’ in the top right leads to this, which is, yet again, confusing.

‘My media’ - This makes some sense and at least ‘Manage’ allows me to upload media, but what actually has access to it because I couldn’t use anything in here on a dashboard (I haven’t tried templates yet but I am guessing it will be the same?).
‘AI generated images’ - This is a good one! Firstly, what is it? Secondly, if I click into it get this:

“It looks like you have not yet created a media directory.” - Then where on earth am I looking at right now?

I won’t reproduce it here but clicking the link to the docs is absolutely no use whatsoever in unravelling this.


Going to Settings, People and clicking a person to add a picture gives this:

The picture has to come from the ‘media’ folder. If you click ‘select from media’ it takes you to here…

…clicking Manage takes you here…

…and then what?

I agree this possibly more a process flow issue with the Person UI but it is still indicative of the ‘confusing mess’
Why can’t it use a picture from the www folder?


I’m more than happy to have this all explained to me, to be told I am wrong and to be shown that it is all perfectly logical and sensible and then eat humble pie for just not understanding.

But having been with HA since long before media was even a thing and now trying to catch up and tidy up my config (specifically my www folder which is a ‘confusing mess’ of my own making) it really makes little sense to me and doesn’t lend itself to ‘tidying up’. In fact if I want to use the same picture in the UI Person I seem to have to duplicate it to use it as a picture_entity in a template.

That works fine. For example, the following files are currently located under “My media” on my system.


If I want to insert an image into an image card and click on the image path, the “media” folder appears; I can then select the image (in this case, PV.png) and insert it.

The files available under “My media” are located at the root under media/.


and can be opened from there; alternatively, files can be saved there - for example, via an automation. Here is an example where a camera saves snapshots to that location.

Yeah, I never really understood why they eventually introduced those two additional selection options - “Image” and “Image Update” - under “My media,” alongside the “Media” and “WWW” storage locations. But the HA developers must have had some reason for it. :slightly_smiling_face: I’ve only ever used the “media” and “www” folders myself. :laughing:

Thanks for that. I only use yaml so I’ll revisit.
(for some reason I never remember that using the UI is always an option for finding out what the correct syntax/way of doing something is)

but…

I love HA and have the utmost respect for the developers but I’m glad you didn’t put the word ‘good’ in between ‘some’ and ‘reason’!
:grimacing:

A little more investigation reveals (I think) that if you want to play sounds from an automation you must use local/ (which is config/www) but anything that has been ‘compiled’ by HA can use either media/ or local/.

So for me it looks like I can forget the media folder completely as I can’t imagine ever needing it for anything.

Except of course I have to use it just for the pictures I want to assign to the Person entites.

I stand by my assertion that it is a bit of a confusing mess.

.

The whole business of storage locations and options in HA has actually always been a bit “complicated”, partly because things have changed over the years - especially regarding file paths and access permissions. In any case, I was glad when I finally grasped it well enough that my current workflow still works to this day. :laughing: As I mentioned, I completely ignore the “Image” and “Image Upload” features under “My Media” because I don’t see any need or added value in them for my own use - though, of course, other users might feel differently.

Here are just two of the many possible links on the subject: :slightly_smiling_face:

@Sir_Goodenough

I object to this being re-tagged under Social.
Not strongly, but enough to comment.
This is clearly not a social post. It is about how to configure HA (or how HA is configured).

I’m sorry but this is turning into a really bad joke.

Assigning a picture to a Person…

I used to have pictures assigned to my people. I have no idea what location I originally picked those pictures from because I set them years ago (but I am fairly certain it was not from the \media folder - I don’t think it even existed back then).

Recently I found those pictures no longer appeared so I went through the process of trying to re-assign them (which was actually the catalyst for this OP).

I have no idea why they disappeared but most likely something changed behind the scenes (because the “HA developers must have had some good reason for it”), or possibly I did something.

But neither explanation matters too much.

After some too-ing and fro-ing trying to work out the mystery of media locations I reset the pictures on my PC.

So far so good.

Now however, I find that the pictures have not carried across to the mobile app and what is worse I cannot even set them there, trying to do so takes me to the familiar…

Choosing ‘select from media’, takes me here…

And, yes, you guessed it choosing ‘Manage’ gives me this…

Really? What is going on?

I’m assuming the media\Image upload folder is local, so that means every device will need to have it’s own copy of the pictures that are assigned to people.

Accepting the fact that is isn’t the worst issue HA has ever had[1], frankly this is an absolutely ridiculous situation.

[1] Except it is quite serious because people don’t appear on the map


[Because this is the Internet, the usual postscript applies; if I’m wrong blah blah blah]

I can’t tell you what you can or can’t do with the HA app, because I don’t set anything up through it. However, the principle behind “Add,” “Upload,” and “Manage” is:

First, you need to add and upload an image.


Example for person:

It will only appear under Media → Image Upload once you have done that.

Under “Manage” you can only delete existing images - nothing else.

I can’t tell you where HA stores the data from “Image upload,” either. In any case, it’s not under Media/, or /homeassistant/image, or /homeassistant/www. But I’ve never really cared about that, precisely because I don’t use those two relatively new features - “Image” and “Image upload” - anyway. :slightly_smiling_face: Another user here will likely be able to answer the question of where the “Image upload” files are actually stored.

I debated myself a couple of minutes, but decided it’s not actually asking a question a much as commenting on the state of things. There will likely not be an ‘answer’ like you would expect from a configuration question. Also more eyes tend to see it here. You can move it back if you want, I won’t change it again.