Components
Media Library
Integrations
File info
When selecting an item from the Media Library, the file info panel appears. This panel contains the most important information about the selected media item. Depending on the driver, there is also the ability to edit meta data relating to the image.
Tags
If you are using the Media Library Item Driver and have spatie/laravel-tags installed, the Media Library will automatically show a tags input in the file info panel. This allows you to easily add or remove tags from the selected media item.
Disabling automatic tags integration
If you would like to disable the automatic tags integration, you can pass false to the ->spatieTagsIntegration() method:
File info edit
The File info panel also allows you to edit metadata relating to the selected media item. For the MediaLibraryItemDriver, this includes an automatically provided edit form for editing the media item's caption and alt-text.
To define a custom file info edit form, follow the steps below:
Components
First, you need to define the components that will be used in the file info edit form. You can do this by using the ->fileInfoEditComponents() method on the driver.
Hydrating the form
Next, you need to hydrate the form with the existing data from the file. You can do this by using the ->hydrateFileInfoEditUsing() method on the driver.
Saving the form
Next, you need to hydrate the form with the existing data from the file. You can do this by using the ->hydrateFileInfoEditUsing() method on the driver.
This way, the provided captions show up in the file info edit form and they will be hydrated and saved correctly.