Browse at first.
@ww7 Can you explain in more detail?
Guessing this is about breaking assets into multiple folders instead of just the media folder. We're planning to solve this eventually with asset collections, but I don't think there's an issue for it yet.
@erquhart - do you have a design or issue for assets collections? That means being able to put media in realtime path (inside static) to the collections?
I'll be happy to contribute that if it's in your plan or have an open issues about it (couldn't find one...)
@dudil that would be awesome. No design work has been done - do you work in design, development or both? I'm expecting to just have a vertical list of asset collections on the left side, which would map to folders, and you could specify for an image or file field which asset collections it could pull from.
I'll get a proper issue together.
@erquhart - I'm more on the development side, but can handle simple design (copy paste mainly :) )
What I had was something more simple and maybe different.
To be able to override the media_folder and public_folder per collection
for example:
collections:
- name: "blog" # Used in routes, e.g., /admin/collections/blog
label: "Blog" # Used in the UI
folder: "content/blog" # The path to the folder where the documents are stored
media_folder: "static/images/blog/" # override for blog collection
public_folder: "/images/uploads/blog/" # override for blog collection
BTW - if that could be changed to include also the parameter options, it will be even better something like {{slug}} etc.
What do you think about this?
I like @dudil idea. It is pretty simple and straightforward.
I am going through the CMS right now and having to dump all the images in one folder is not very attractive. I like to have image subfolders in the various content folders -- like blog/images and galleries/galleryname/images, etc.
This change would be awesome!
We're talking about the same things, actually, I'm just tacking on the concern of making assets discoverable in the general Media Library interface, otherwise you'd have to navigate to a collection, open an entry, and click an image field to see the images in that folder.
That said, if you want to put together a PR for the change you're describing and multiple folders being used in the same config, that'd be a strong start.
This would be really good. At the moment we can only use the CMS for our blog as I don't want to have the images for the blog, feature pages etc all in the same folder.
@tomhamiltonstubber For something like that, a possibly viable workaround would be to create a different CMS instance for each part (blog, site, etc). If you want to discuss more, we can chat on Gitter: https://gitter.im/netlify/NetlifyCMS.
I would love to have the possibility to organize my media in folders like year and month.
Alright folks, trying to determine a minimal approach to satisfy _most_ of what folks need from this feature. I'd expect those needs to be:
Here's the lowest effort approach I could think of:
Thoughts?
It would be nice to be able to co-locate media folders in the same place as collections. For example, blog images go under the blog/images folder or even better under blog/{{slug}}/images folders.
@jimmyangel totally - would you mind opening a separate issue for that? It's been discussed many times, but I can't find an issue for it.
As has been mentioned by various people above, I've openend an issue for Assets Relative to Content.
Question: are you guys still planning to add the ability to work with folders for images, instead of dumping all the images in one folder?
Thanks
Yes, but #1472 comes first.
Hi,
wouldn't be a super-simple and maybe temporary solution to implement the suggestions in #399, namely overriding the media_folder parameter in each collection or within the widget image scope?
The current setting, a single big directory for all the images, is probably scaring a lot of people away from the CMS
Having media_folder and public_folder overridable at widget level would be perfect for most use cases...
how is the status of this feature?
With https://github.com/netlify/netlify-cms/issues/1472 resolved you can set a media_folder on a collection which will be regarded as a relative path for media files based on the entry location.
Collection specific media files will not be shown in the "global" media library, but only when opening the media library from the editor.
More information here: https://www.netlifycms.org/docs/beta-features/#folder-collections-media-folder
is there any one who can help me to structure media_folder and public_folder media_folder: static/images
public_folder: /images after posting new blog the path of the image begins / and will be image: /images/cold-conifer-dawn-917494.jpg but my previous image path was like this ../../images/AfMiI.jpg and the error will be *Field "image" must not have a selection since type "String" has no subfields
* because there is no any data inside this field.
Hi @AbdifatahZamiir can you please open a new issue with your scenario? (share the config.yml and repo if possible so we can reproduce it).
This issue became about three separate issues, two of which are resolved:
For clarity, the third point will be covered under #3240.
Most helpful comment
Alright folks, trying to determine a minimal approach to satisfy _most_ of what folks need from this feature. I'd expect those needs to be:
Here's the lowest effort approach I could think of:
Thoughts?