Media Library Widget Upload Progress Drupal 8
Using the new Media Library in Drupal viii.6
Drupal 8.6 has shipped with the Media Library! It'due south just one role of the latest round of improvements from the Media Initiative, but what a slap-up improvement! Being brand new it's however in the "experimental" module country but we've gear up information technology up on this website to test it out and are feeling pretty comfortable with its stability.
That said, I highly encourage you exam it thoroughly on your own site before enabling whatsoever experimental module on a production site. Don't just take my word for information technology :)
What it adds
The Media Library has two main parts to it...
Grid List
There's the Grid Listing at /admin/content/media, which takes precedence over the usual tabular array of media items (which is notwithstanding available nether the "Table" tab). The grid renders a new Media Library view manner showing the thumbnail and compact title, besides as the bulk edit checkbox.
Field Widget
And so there's the field widget! The field widget can be assault the "Manage Course Display" page of any entity with a Media Reference Field. Once enabled, an editor can either scan existing media (by accessing the Grid Listing in a modal) or create a new media detail (utilising the new Media Library form way - which is easy to customise).
The widget is very similar to what the 'Inline Entity Class' module gave y'all, especially when paired with the Entity Browsers IEF submodule. Only the terminal result is a much nicer brandish and in full general feels like a nicer UX. Plus it's in cadre and so you don't need to add actress modules!
The widget also supports bulk upload which is fantastic. It respects the Media Reference Fields cardinality, and so limit it to one - and just file can be uploaded or selected from the browser. Allow more than one and upload or select up to that exact number. The field even tells you how many you lot can add and how many you have left. And yes, the field supports drag and drib :)
What is doesn't add
WYSIWYG embedding
WYSIWYG embed support is now being worked on for a hereafter release of Drupal eight core, yous can follow this Meta issue to keep track of the progress. It sounds like some version of Entity Embed (possibly limited to Media) will make it'due south mode in and some grade of CKEditor plugin or button will be available to achieve something similar to what the Media Entity Browser, Entity Browser, Entity Embed and Embed module fix provides currently.
Until so though, we've been working on integrating the Media Libraries Filigree Listing into a submodule of Media Entity Browser to provide editors with the UX improvements that came with Media Library only keeping the aforementioned WYSIWYG embed procedure (and the contrib modules backside it) they're currently used to (assuming they're already using Media Entity Browser, of grade). More on this submodule beneath.
This is essentially a temporary solution until the Media Initiative team and those who help out on their issue queue (all the way from UX through to dev) have the time and mental space to get it into core. Information technology should hopefully have all same the bulk upload features the field widget has, it might fifty-fifty be able to back up majority embedding too!
View manner or image style selectors for editors
Site builders tin set the view way of the rendered media entity from the manage display page, which in turn allows you to gear up an image way for that view fashion, merely editors tin can't change this per epitome (without needing multiple dissimilar Media reference fields).
There is work on supporting this idea for images uploaded via CKEditor directly, which has nothing to do with Media, but I call up information technology would be a nice feature for Media embedding via WYSIWYG too. Potentially as well for Media Reference Fields. Simply by no ways a bargain billow.
Avant-garde cropping
From what I can gather in that location are no plans to add any more than advanced cropping capabilities into core. This is probably a skillful thing since cropping requirements can differ profoundly and nosotros don't want core to get as well big. And then contrib will still be your goto for this. Image Widget Crop is my favourite for this, but there's too the simpler Focal Indicate.
You lot can test out the submodule from the patch on this issue and let us know what yous think! In one case the patch is added, enable the submodule so edit your existing Entity Browsers and swap the View widget over to the "Media Entity Browser (Media Library)" view.
Information technology shouldn't affair if yous've customised your entity browser. If you've added something similar Dropzone for drag-and-drib support information technology *should* still piece of work (if not, cheque the Dropzone or Entity Browser event queues). If you've customised the view it uses withal, you might need to redo those customisations on the new view.
I also like updating the Form Mode of the Entity Browsers IEF widget to use the new Media Library form brandish, which I ever pair back to just the essential fields (who really needs to manually gear up the author and created time of uploaded media?).
You withal can't embed more than one media item at a time. Simply at least now you likewise tin't select more than 1 item when browsing so that'due south definitely an improvement.
Plus editors will experience a fairly consequent UX between browsing and uploading media on fields as they do via the WYSIWYG.
Once setup and tested (ensuring you've updated any Media Reference Fields to utilize the new Media Library widget also) you can safely disable the base Media Entity Browser module and delete any unused configuration - information technology should simply be the old "Media Entity Browser" view.
Please post whatsoever feedback on the upshot itself so we can brand certain it's at its best before rolling another release of the module.
Happy days!
I hope yous have as much fun setting upwardly the Media Library equally I did. If you want to contribute to the Media Initiative I'm certain they'll exist more happy for the help! They've done a fantastic job and so far only there's withal enough left to exercise.
Comments
Nice and useful article of Media Library in core usage into each Drupal 8 project.
Thank you!
I'm running the latest Media and Media library in Drupal eight.6.7. I have added a couple additional fields to the Media Image type. So at present I can add an epitome, plus requite information technology a category, a caption, a credit, and a text area. Trouble is, I'm not able to alter the image itself one time information technology'southward been created. With content types, such as article, you can change nigh everything but the machine name. Am I missing the point? Is this a characteristic, not a problems?
Hey Morgan, you certainly should be able to, though it's a bit less obvious with the new Grid display... If you click on any existing Media entities title you lot'll get the Edit tab only similar normal content. It might be easier to switch to the erstwhile Tabular array brandish (/admin/content/media-tabular array) and use the edit buttons in that location.
But once yous're on the edit screen of your existing media you lot can use the 'Remove' button of the image field to remove the current image and upload a new one.
It'south actually an first-class module, do you recall information technology'due south possible today to use it in production? Thank you in accelerate.
Drupal 8.vii.0 is available now, in that location are improvements in Media Library!
I'm running Drupal eight.half-dozen.15 and when the media library is enabled and I navigate to Media tab I cannot observe the Table and Grid secondary tab, although I am using the Seven theme every bit administrator theme. Also, the tabs do appear in the Contents tab every bit Overview and Moderated Content.
Am I missing some other settings that need to be washed to display the filigree/table view tab ?
Thanks
Do you lot know if there is an easy way to integrate DAMs like Cloudinary into Media Library?
Source: https://www.previousnext.com.au/blog/using-new-media-library-drupal-86
0 Response to "Media Library Widget Upload Progress Drupal 8"
Post a Comment