Media Library #3264
Replies: 3 comments
-
Just had a thought, such implementation would make users, who already use Pages structure, to move to this new library very easy by just moving file structure :) |
Beta Was this translation helpful? Give feedback.
-
This is the domain for extensions; The field to select Media can replicate the currently existing ones, adapting them as needed. There's nothing preventing a solution like in #323. This isn't apt for a Core-change, as Page and Pages are ultimately the most stable and utilized part of Grav. The Media-instance is currently bound to a Page, but that could and should be further decoupled. It's not necessary for a media library though, as they can be bound programmatically. Which is to say, as a change to Core it would be backwards-incompatible with virtually all current installations of Grav and a vast array of extensions. As a plugin it only requires overriding some functionality in Admin, as it doesn't need to change anything in Core. |
Beta Was this translation helpful? Give feedback.
-
Hello! |
Beta Was this translation helpful? Give feedback.
-
As I'm not only a developer, but also a hobbyist photographer, I can't stop thinking about some media library (probably not only images). I've been searching quite a bit, and so far I see only one remotely acceptable approach, but it has some limitations (can't easily remove from Pages listing for one) and at the same time lots of overhead (unnecessary configurable options).
So I was giving some thought and with my current knowledge of Grav, I always end up with an idea, that media library could be almost exact same thing as Pages. Should be located at
user://media-library
and have almost exact same structure as Pages - media items with folders and subfolders (directories). Folder, same as Page could have Title, Content and Media Order. Also folders would be multi-lingual as Pages are now - no need to invent something new.It also should come with a new input field to (multi) select files from Media library. Could be auto-complete probably, but maybe simple select with
<optgroup>
as a folder could be a start. Basically it could be same aspages
type field, but with different root.The only drawback I see currently - no multi-lingual metadata for media files. Saw some topics on this too, but I guess this could be achieved at some point.
I would try to implement something like this, if Pages was a plugin, but now it's a part of core, so not sure how to approach this as a plugin or even as a core change.
Hopefully we'll get media lib sooner than later :) I really believe it shouldn't be that difficult to implement by taking Pages and just stripping them down.
Beta Was this translation helpful? Give feedback.
All reactions