How to Work with Media in DrupalPresentation Transcript
How to Work with Media
‣ Director of Education, Lullabot
Product Manager of Drupalize.Me
‣ Co-author of the O’Reilly Using Drupal book
‣ Download the slides from:
‣ Dis/advantages of using Media
‣ How to pick the right version
‣ Basic conﬁguration concepts
‣ Extending Media
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 ﬁles
‣ Integrate: WYSIYWG and ﬁelds can be used to display
‣ Managing reusable content
‣ Consistent interface
‣ Media works with the concepts of entities and ﬁles,
just like core
‣ Can be extended to use external media
‣ There is excellent community support for Media
Scald - https://drupal.org/project/scald
‣ Drag-and-drop UI
‣ Does not extend core with entities and ﬁles
‣ Has a smaller support base
(Dis) Advantages of 1.x
‣ Currently the recommended release
‣ Very stable software
‣ No new features, bug ﬁxes only
‣ Does not require any developer-savviness as things
should “just work”
(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.
‣ Content type ﬁelds (core ﬁle and image)
‣ File types (image, audio, video, etc.)
‣ Managing display (ﬁeld, entity, ﬁle, image styles)
Content Type Media Fields
• File (core)
• Image (core)
• ﬁle or image uploader (core)
• Media ﬁle selector
‣ Extends the core File entity
‣ Diﬀerent kinds of ﬁles (image, video, audio, etc.)
‣ Each ﬁle type can have ﬁelds for meta info
‣ Files have display options (view mode/media format)
can use core image styles for display
Content type: File ﬁeld with Media ﬁle selector widget
Image ﬁle type: ﬁelds for all images (ﬁle name, copyright)
File: display view modes (preview, large)
Core image styles
List of modules for Media
‣ External Providers
Popular extensions include:
‣ oEmbed - https://drupal.org/project/oembed
Embed content from 3rd parties (e.g. YouTube, Flickr).
‣ File Lock - https://drupal.org/project/ﬁle_lock
Prevents core from deleting ﬁles not attached to
nodes (to maintain an asset library).
We have 30 videos on Media 1.x and Media 2.x for you.
Download the slides and access the Media module