how to work with media in drupal
TRANSCRIPT
![Page 1: How to Work with Media in Drupal](https://reader034.vdocument.in/reader034/viewer/2022042700/554ae1fab4c905a37c8b4dc0/html5/thumbnails/1.jpg)
How to Work with Media
![Page 2: How to Work with Media in Drupal](https://reader034.vdocument.in/reader034/viewer/2022042700/554ae1fab4c905a37c8b4dc0/html5/thumbnails/2.jpg)
Addison Berry‣ Director of Education, Lullabot
• Product Manager of Drupalize.Me ‣ Co-author of the O’Reilly Using Drupal book ‣ @add1sun
![Page 3: How to Work with Media in Drupal](https://reader034.vdocument.in/reader034/viewer/2022042700/554ae1fab4c905a37c8b4dc0/html5/thumbnails/3.jpg)
Today!‣ Download the slides from:
http://lb.cm/acquia-mediamodule ‣ Dis/advantages of using Media ‣ How to pick the right version ‣ Basic configuration concepts ‣ Extending Media
![Page 4: How to Work with Media in Drupal](https://reader034.vdocument.in/reader034/viewer/2022042700/554ae1fab4c905a37c8b4dc0/html5/thumbnails/4.jpg)
What is Media?‣ Upload: Provides the ability to upload images, videos,
and audio to your site ‣ Manage: A library interface, which allows you to
choose from previously uploaded files ‣ Integrate: WYSIYWG and fields can be used to display
media-managed assets
![Page 5: How to Work with Media in Drupal](https://reader034.vdocument.in/reader034/viewer/2022042700/554ae1fab4c905a37c8b4dc0/html5/thumbnails/5.jpg)
![Page 6: How to Work with Media in Drupal](https://reader034.vdocument.in/reader034/viewer/2022042700/554ae1fab4c905a37c8b4dc0/html5/thumbnails/6.jpg)
![Page 7: How to Work with Media in Drupal](https://reader034.vdocument.in/reader034/viewer/2022042700/554ae1fab4c905a37c8b4dc0/html5/thumbnails/7.jpg)
Why Media?‣ Managing reusable content ‣ Consistent interface ‣ Media works with the concepts of entities and files,
just like core ‣ Can be extended to use external media ‣ There is excellent community support for Media
![Page 8: How to Work with Media in Drupal](https://reader034.vdocument.in/reader034/viewer/2022042700/554ae1fab4c905a37c8b4dc0/html5/thumbnails/8.jpg)
CompetitorsSingle-media modules ‣ Image: core ‣ Video: https://drupal.org/project/video ‣ AudioField: https://drupal.org/project/audiofield
![Page 9: How to Work with Media in Drupal](https://reader034.vdocument.in/reader034/viewer/2022042700/554ae1fab4c905a37c8b4dc0/html5/thumbnails/9.jpg)
CompetitorsScald - https://drupal.org/project/scald ‣ Drag-and-drop UI ‣ Does not extend core with entities and files ‣ Has a smaller support base
![Page 10: How to Work with Media in Drupal](https://reader034.vdocument.in/reader034/viewer/2022042700/554ae1fab4c905a37c8b4dc0/html5/thumbnails/10.jpg)
Which Version?‣ 1.x ‣ 2.x
![Page 11: How to Work with Media in Drupal](https://reader034.vdocument.in/reader034/viewer/2022042700/554ae1fab4c905a37c8b4dc0/html5/thumbnails/11.jpg)
(Dis) Advantages of 1.x‣ Currently the recommended release ‣ Very stable software ‣ No new features, bug fixes only ‣ Does not require any developer-savviness as things
should “just work”
![Page 12: How to Work with Media in Drupal](https://reader034.vdocument.in/reader034/viewer/2022042700/554ae1fab4c905a37c8b4dc0/html5/thumbnails/12.jpg)
(Dis) Advantages of 2.x‣ Integrates with Views, to give more control of the UI. ‣ Rich ecosystem of supporting modules. ‣ Alpha software: troubleshooting might be required. ‣ Will be ported to Drupal 8 when the time comes.
![Page 13: How to Work with Media in Drupal](https://reader034.vdocument.in/reader034/viewer/2022042700/554ae1fab4c905a37c8b4dc0/html5/thumbnails/13.jpg)
Configuring Media‣ Content type fields (core file and image) ‣ File types (image, audio, video, etc.) ‣ Managing display (field, entity, file, image styles)
![Page 14: How to Work with Media in Drupal](https://reader034.vdocument.in/reader034/viewer/2022042700/554ae1fab4c905a37c8b4dc0/html5/thumbnails/14.jpg)
Content Type Media Fields‣ Fields
• File (core) • Image (core)
‣ Widgets • file or image uploader (core) • Media file selector
![Page 15: How to Work with Media in Drupal](https://reader034.vdocument.in/reader034/viewer/2022042700/554ae1fab4c905a37c8b4dc0/html5/thumbnails/15.jpg)
![Page 16: How to Work with Media in Drupal](https://reader034.vdocument.in/reader034/viewer/2022042700/554ae1fab4c905a37c8b4dc0/html5/thumbnails/16.jpg)
File Types‣ Extends the core File entity ‣ Different kinds of files (image, video, audio, etc.) ‣ Each file type can have fields for meta info ‣ Files have display options (view mode/media format)
• can use core image styles for display
![Page 17: How to Work with Media in Drupal](https://reader034.vdocument.in/reader034/viewer/2022042700/554ae1fab4c905a37c8b4dc0/html5/thumbnails/17.jpg)
![Page 18: How to Work with Media in Drupal](https://reader034.vdocument.in/reader034/viewer/2022042700/554ae1fab4c905a37c8b4dc0/html5/thumbnails/18.jpg)
![Page 19: How to Work with Media in Drupal](https://reader034.vdocument.in/reader034/viewer/2022042700/554ae1fab4c905a37c8b4dc0/html5/thumbnails/19.jpg)
![Page 20: How to Work with Media in Drupal](https://reader034.vdocument.in/reader034/viewer/2022042700/554ae1fab4c905a37c8b4dc0/html5/thumbnails/20.jpg)
![Page 21: How to Work with Media in Drupal](https://reader034.vdocument.in/reader034/viewer/2022042700/554ae1fab4c905a37c8b4dc0/html5/thumbnails/21.jpg)
![Page 22: How to Work with Media in Drupal](https://reader034.vdocument.in/reader034/viewer/2022042700/554ae1fab4c905a37c8b4dc0/html5/thumbnails/22.jpg)
Content type: File field with Media file selector widget
Image file type: fields for all images (file name, copyright)
File: display view modes (preview, large)
Core image styles
![Page 23: How to Work with Media in Drupal](https://reader034.vdocument.in/reader034/viewer/2022042700/554ae1fab4c905a37c8b4dc0/html5/thumbnails/23.jpg)
Extending MediaList of modules for Media https://groups.drupal.org/node/168009 !
‣ External Providers ‣ Players
![Page 24: How to Work with Media in Drupal](https://reader034.vdocument.in/reader034/viewer/2022042700/554ae1fab4c905a37c8b4dc0/html5/thumbnails/24.jpg)
Extending MediaPopular extensions include: ‣ oEmbed - https://drupal.org/project/oembed
Embed content from 3rd parties (e.g. YouTube, Flickr). ‣ File Lock - https://drupal.org/project/file_lock
Prevents core from deleting files not attached to nodes (to maintain an asset library).
![Page 26: How to Work with Media in Drupal](https://reader034.vdocument.in/reader034/viewer/2022042700/554ae1fab4c905a37c8b4dc0/html5/thumbnails/26.jpg)
ResourcesDownload the slides and access the Media module lessons from: ‣ http://lb.cm/acquia-mediamodule