Posted on .
Categories: Nautica CMS
I’m confronted with a dilemma: how to manage images in my tiny CMS. Choice one is to create a single repository of images. All the images would go in a single folder and this folder would have a massive database in a form of a JSON file with the image properties. Option number two: create a separate image folder for each and every blog post or page.
At this moment, I implemented the option number two, but I’m not fully confident. I don’t like the idea of being in a situation where I would have to load two identical files so these files could be used in different posts.
The option one will not have such issues, as full repository of images will be available from single location. The problem is the complexity of implementing such setup. Files would have to be identified by their respective filenames to be able to query the JSON file with picture characteristics. This might lead to file corruption, inconsistent results if there are files with the same names... In nutshell, a complexity that I try to avoid with this tiny CMS.
To practice a little, I started building the photo gallery page. I want to build an “image showcase” pop up web page, so if someone wants more details on certain image, a pop up would be opened with added details and higher resolution. This experience will help me decide which way should I take in my endeavor.