New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make it possible to filter for unused media elements #1005
Comments
I agree that this should be come in handy, but as for the migration we can focus on only migrating used media files. Therefore, I would leave it on the Version 2.0 milestone. |
Is there any consent on how this should be implemented? Scanning at runtime sounds very slow to me. So should we only perform this one time scan during migration and add fields to media files that get set if they are added / removed somewhere? Maybe a decorator implementation to all functions involving media files might be a good idea to check it? Otherwise, there will a lot of redundant code I assume. |
Actually, the information is already stored in the database implicitly by our broken link checker.
This gets all usages in the content, and then we probably want to additionally count the usages as icon, but this is even simpler:
And since it's so easy, it probably also makes sense to directly show the first 1-2 objects where it's used in the sidebar of the media library, in case users want to directly edit the page where the image is used. |
I see. I´m on it. Thanks for the input 👍 |
Motivation
In the media library, it should be possible to filter for all media elements which are not embedded in any pages/events/pois and are not used as icon of any object.
Proposed Solution
Evaluate possible approaches for this task, e.g. whether we should store this information somewhere in the database and update it every time a media element is inserted into a page, or whether this should be "calculated" at runtime by scanning the whole content for occurrences of the media file's absolute paths.
Alternatives
Additional Context
The text was updated successfully, but these errors were encountered: