Do I need to upload the media folder?

Hi there,

I seem to remember to have read somewhere that the media folder does not need to be uploaded in the deployment process, but I can’t find it anywhere in the documentation.

So, my quick question: Is it correct that it does not need to be uploaded? If so, when exactly do the files get generated? On the first opening of the page? Or earlier?

Thank you!

The media folder is auto-generated. Files are created when they are first called in the browser or published programmatically ($file->publish()).

1 Like

Ok, thanks, that answers my question.

Might I kindly suggest to include this somewhere in the docs, as it is not really obvious for beginners like me. Also, in general, I think a tutorial/recipe about deployment in general might be helpful (including git etc.), but I am not sure if this is too broad of a topic.

The media folder is actually in the Starterkit’s .gitignore file, so if you use Git for deployment, its contents won’t be deployed (apart from the index.html).

I’ve added that the folder is autogenerated here: https://getkirby.com/docs/guide/tour#kirby-s-folder-structure

And created an issue to include a little chapter somewhere about the media folder.

1 Like

Ah, that might be were I had the info from initially. :smiley: