Overview of image styles and how they are used to display a single image in several variations.
The ability to upload, manage, and display various assets like files, images, videos, and audio, is important to many websites. In addition to simple file display and download, there are also options to embed different kinds of external media within content for viewing and playing. If a site has a lot of assets, there are also tools to help manage and quickly find, edit, and reuse existing assets when needed.
Example tasks
- Add a field that allows for file upload and download
- Embed images and video in content
- Manage preset image styles
- Browse and locate a file from a media library
Confidence
Media management has been in rapid development throughout Drupal 7's life cycle and into Drupal 8, so documentation may not always match the latest version of the modules. As of Drupal 8.4, media features are being added to core with a new Media entity type. This is the first step in completing the "Essentials" phase of adding media to core. You can read more about the full plan in the Media in Drupal 8 Initiative issue. The plan for the Essentials phase in 8.4 and 8.5 can be found in the Media initiative: Essentials - first round of improvements in core issue. This means media in Drupal 8 is very much in flux and documentation will change regularly.
Drupalize.Me resources
The following tutorials are for Drupal 7, but in many cases the techniques still apply for Drupal 8.
External resources
- Drupal 8 Media Documentation (drupal-media.gitbooks.io)
- Documentation about Media module from the team who create and maintain it.
- 6.12 Concept: Image Styles (drupal.org)
- Explains Drupal core's Image Styles and links to additional documentation on how to configure them.
- Media Libraries in Drupal 8 (electriccitizen.com)
- An introduction to the contributed modules for working with media as of Drupal 8.3.
- The Legendary Drupal 8 Media Library Unicorn presentation (tcdrupal.org)
- A video of a camp presentation of the material covered in the above Electric Citizen article.
- How to Embed Just About Anything in Drupal 8 WYSIWYG with Entity Embed and URL Embed (lullabot.com)
- Learn how to embed images with a WYSIWYG.
- Common Pitfalls When Configuring Entity Browser in Drupal 8 (lullabot.com)
- Learn how to work with Entity Browser to manage your media assets.