Site structure, media folder seems to have duplicates of all the site content / images...?

Hi there

I am trying to get my kirby site file size down, and I compressed all the images before uploading to server. BUT I just noticed there seems to be a duplicate of all the files inside “kirby” folder, separate from the “content” folder which has the up to date site content in use in the front end. Can I delete the folders in kirby, or?? Attached screenshots below.

Screen Shot 2020-10-16 at 12.01.28 PM

The content folder hold the original files. The media folder is more of a cache, the complete folder can be deleted and will be recreated again from the files in the content folder. So you should never remove your original files from the content folder. These are the ones that you keep and that should and would be version controlled (if you use version control), not the media folder.

Background: Image URLs - How to remove string?

Ah, great, I’ll do that because it was like…4.6 GB! Is this something one should regularly go in and do ? Delete both the panel and the pages folders inside the media folder?

Kirby usually deletes thumbs when a file is deleted via the Panel. But nevertheless, if you make changes in your templates (e.g. changes sizes of thumbs), these then superfluous thumbs do not get deleted. In such cases, it might make sense to occasionally delete the media folder.

You should also delete the media folder when you update the Kirby core.

Will do, but I have never heard this term, what is updating the Kirby core mean?

That means when you update to a new Kirby version