My Kirby /content folder is 2.3 gb in size, but for a while did not paid attention to /media folder which as it appears raised to 10 gb size over the time.
So question is - is there way to prevent that file generation if file once is generated?
Need to admit that using Kirby as db for React frontend. In Kirby wrote my own API php file which generates JSON with all links. As noticed, files to media folder are copied when accessing/requesting file (image) via url in application.
Another strange thing - its working in local development mode (PHP 8.0.14), but not working on server (PHP 7.4.28). For example - if I clicking on image in panel (so it would open large in new tab) - I get “Not found”. But path is fully correct… and image physically is located there…
Plugin code is from previously mentioned example / documentation:
Kirby version 3.6.2 … seems that Kirby is not serving content folder or its some .htaccess rule in kirby folder?.. because if I serve content folder with different service, then images in content folder is accessible in my web application.
While this working for original files, as discussed previously - for thumbnails (which are generated and stored in media folder) its not working. Problem is that Im generating API json with all thumbnail links, but physically they are not generated in media folder - only when first time accessing/ referring them, then they are generated and available. If I have 1000 pages, I need to open each page so thumbnail would be generated …
Any suggestions how to create some script which would put those thumbnails in media folder?
Main idea - to create standalone content/media folder which I can use without php.
Which pointed me to necessary direction - $image->publish() does the job for copying images to /media folder, BUT somehow it does not work if I generate thumbnails… currently don’t understand what Im missing.