I like this idea (fig v2), because it keeps all my media in one place. This seems to make sense to me - because I may want to reuse images in different articles/guides/reviews, and from what I have read I think this will work better than nested bundles with netlify cms - although they may have addressed the issue. (https://github.com/netlify/netlify-cms/issues/513).
However I don’t want url/media/name.jpg to be rendered in the browser. I added “headless: true” to the index.md in the media folder - so now url/media/ gets the 404 page but url/media/name.jpg still renders.
Furthermore it doesn’t seem that this is the intended proper way to work with image processing through page bundles. I am following (Image Processing Outside Folder thread) and @bep mentions some downsides of hacky workarounds. He also mentioned twice “Having images and content bundled together has lots of benefits”
Is this (fig v3) the proper structure to use for page bundles and image processing?
Will I still be able to reuse images in later articles/guides/reviews without forcing the user to download multiple copies?
What are the benefits of the page bundle approach, why is it superior?
That is a very old thread you linked to and it is outdated.
See the resources.Get method it’s faster than Page Bundles and you can keep your existing content organization. All you need is to create a symlink of the static folder into the assets folder or turn the static folder into the assets folder with the assetDir configuration option.
P.S. I’m on my mobile and about to go to a gallery opening. There are topics in the forum about the tips I gave you, look it up.
Page Bundles have their use and they are perfectly cool. But resources.Get will indeed allow you to use image processing without altering your content organization and that is a time-saver.
I think that content structure depends on the project and also it’s a matter of preference. For example I have a project with 8 headless bundles directly under /content/ that have their contents loaded dynamically with Photoswipe from the index page.
You determined statig/img as your asset directory. So all relevant elements should be in there. The default is assets as root folder. You can define only one assetDir. You can symlink your static folder to assets.
note: resources must be registered in the .md for their bundle, not the .md of the content intended for use. So this likely has to be manually updated with each new image thrown into the media folder.