Attempting to understand the Drupal 7 Media module

The Drupal 7 Media module seems like a step in a really good direction for handling media files and providing an improved user-interface. However, it feels unfinished to me. The format options provided by the module in a WYSIWYG editor like CKEditor don't appear to be very customisable.

In an attempt to try and get my head around how the Media module format options work I recently sat down and tried to work my way through the media setup from a minimal Drupal 7 install. I thought I'd post my notes here for future reference. Perhaps they'll help others understand things, or maybe someone out there can shed further light on things.

  • Currently there doesn't appear to be a way of controlling the options in the format options list
  • Link, preview and large are defined by the image file display options (File types > Manage file display); from a minimal Drupal install with the Media module enabled these are set as:
    • Link (no display)
    • Preview (image display using the square thumbnail image style)
    • Large (image display using the large image style)
    • Original (image display in the original format)
  • Changes to the image file display options are reflected in the output of media from the Media module (although the format options list is fixed to link, preview, large and original); so to make the link format work, from the display options set link to output something, for example "URL to file"
  • Changes to the file display types may need the cache to be cleared to be seen on the site
  • The difference between file types display and image styles is that file types decide how to display a file whereas image styles manipulate an image for display based on the file types display

Hope this helps some of you and removes some of the mystery surrounding the Media module. Hopefully there will be some further development on the module and things will start to work better soon.

Related Content

Published on


Comments

  1. Yura |

    Greetings.

    I have Lightbox2 enabled, I have enabled two Lightbox2 iframes for the image file type here:
    /admin/config/media/file-types/manage/image/file-display

    (To fix the Lightbox2 bug, insert some code as shown here: http://drupal.org/node/1235284#comment-5235764)

    The thing is, I don’t see Lightbox on clicking on the image. Any idea why?

    Thank you.

  2. Andy |

    Hi Yura. I’m not especially familiar with the Lightbox2 module (assuming you are using one). I’d check that there are no JavaScript errors being produced using Firebug or an equivalent.

  3. tostinni |

    Do you have a tutorial on how can I manage to have a different formatter for a given median on a per views basis ?
    Thanks.

Leave a Comment
  • You will need to preview your comment before you can submit it.