Lightning Media provides modules and configuration for great media authoring experiences.

Lightning Media 5.0.0

WARNING: Lightning Media 5.0.0 drops all hard dependencies on contributed modules, as well as all previous update paths. Read the release notes before upgrading to it, or you may break your site!

A note about chunked uploads

Certain hosting providers (including Acquia Cloud Enterprise) are not compatible with the drag-and-drop upload provided by DropzoneJS, which is packaged with Lightning Media 4. There is Acquia-specific documentation explaining how to work around this problem or, for non-Acquia users, a patch for DropzoneJS to support chunked uploads.

Components

Lightning Media's components are not enabled by default. You can install them like any other Drupal modules.

Media Audio (lightning_media_audio)

Provides an Audio file media type, which can be used to store and play audio files like MP3s, WAVs, or AACs.

Bulk Media Upload (lightning_media_bulk_upload)

Leverages the DropzoneJS module to provide a form for uploading media assets in bulk.

Media Document (lightning_media_document)

Provides a Document media type, which can be used for storing files, such as PDFs, or other types of documents.

Media Image (lightning_media_image)

Provides an Image media type, which can be used for storing and displaying images. If the Image Widget Crop module is installed, the Image media type will automatically integrate with it to provide cropping functionality.

Media Instagram (lightning_media_instagram)

Provides an Instagram media type, for referencing and displaying Instagram posts in your Drupal site using the Media Entity Instagram module.

Media Twitter (lightning_media_twitter)

Provides a Tweet media type, for referencing and displaying tweets in your Drupal site using the Media Entity Twitter module.

Media Video (lightning_media_video)

Provides a Video media type for displaying remote videos (e.g., YouTube or Vimeo) in your Drupal site using the Video Embed Field module.

Installation

This component can only be installed using Composer. To add it to your Drupal code base:

# Add Drupal's packagist.
composer config repositories.drupal composer https://packages.drupal.org/8

# Add the Asset Packagist for front-end dependencies.
composer config repositories.asset-packagist composer https://asset-packagist.org

# Add Lightning Media.
composer require drupal/lightning_media

Then install the module as you would any other Drupal module. Note that Lightning Media (lightning_media) doesn't provide any media types out of the box. You will also need to enable at least one of the following sub-modules:

  • Lightning Media Audio (lightning_media_audio)
  • Lightning Media Document (lightning_media_document)
  • Lightning Media Image (lightning_media_image)
  • Lightning Media Instagram (lightning_media_instagram)
  • Lightning Media Twitter (lightning_media_twitter)
  • Lightning Media Video (lightning_media_video)

If you want the ability to bulk upload images for media entities, you should also enable the Lightning Media Bulk Upload (lightning_media_bulk_upload) module.

Updates

Lightning Media and its components use the normal Drupal database update system as often as possible. However, there are occasionally certain updates which touch configuration and may change the functionality of your site. These updates are optional, and are performed by a special utility at the command line. This utility is compatible with Drush 9 or later.

To run updates using Drush:

drush update:lightning

Known Issues

  • If you upload an image into an image field using the new image browser, you can set the image's alt text at upload time, but that text will not be replicated to the image field. This is due to a limitation of Entity Browser's API.
  • Using the bulk upload feature in environments with a load balancer might result in some images not being saved.
Supporting organizations: 
Sponsor of development, support, and maintenance

Project information

Releases