Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Motivation
For sites having a lot of files, loading the Media Library in Gutenberg will result in timeout errors, or give a bad UX since the user will see nothing (white screen) for a long time.
The issue is that Gutenberg Drupal module implements it's own Media library using MediaController.php
and some JS.
Aside from performance issues, this makes it not configurable.
Proposed resolution
- Solution #1: Use Views. Implement Gutenberg "Media library" view for files entities. This makes configurable for pagination, sorting, searching ...etc.
- Solution #2: Use Entity Browser. TBH this is a better solution since it standardizes selection, and browser configuration. However, this might add a dependency on Entity Browser module. Perhaps it could be as "optional" config if Entity Browser module was installed.
Remaining tasks
TBD.
User interface changes
TBD.
API changes
TBD.
Data model changes
TBD.
Release notes snippet
TBD.
Comments
Comment #2
Mohammed J. RazemComment #3
thorandre CreditAttribution: thorandre at Frontkom commentedGood input! This is probably a feature to put into the roadmap ahead.
Comment #4
roborn CreditAttribution: roborn at Frontkom commentedSolution #1 was implemented, but there's a blocking issue https://www.drupal.org/project/gutenberg/issues/3150127
Comment #5
roborn CreditAttribution: roborn at Frontkom commentedSolution #1 is now implemented on 2.x-dev