Up to now, I've been using the Insert + WYSIWYG + CKEditor to insert images with specific Image Styles in a wysiwyg interface. This works well, and it's very easy to select and apply image styles (including colorbox variants) using Insert.

I'm currently testing Media (7.2x) + WYSIWYG + CKEditor as an alternative, and want to make sure I understand how to best use image styles in this context.

Based on a great write-up here (http://www.58bits.com/blog/2013/03/06/how-to-add-captions-to-images-in-drupal), it looks like one way to use Image Styles with Media is to do something like this:

  1. Create desired image styles to use in WYSIWYG editor
  2. Add view mode(s) as needed to the Image file type
  3. Set view mode(s) to use desired image styles under Manage File Display
  4. Choose "Format" (view mode) when embedding Media

Ultimately, this is more powerful than Insert, since the view modes can manage more than just the image (i.e. other fields like title, alt, and more) but it's a little clunky. For one thing, you'd need to add a new view mode for each image style that you want to have access to when embedding (?)

My question: is this currently the best way to use image styles when embedding images using Media (7.2x) + WYSIWYG + CKEditor?


1 Answer 1


It completely depends on your requirement. If you are looking to apply particular styles through wysiwyg then view styles is definitely the right option.

If you need image style (height and width) to be chosen during wysiwyg then go for this option

a) Media + Wysiwyg -: https://drupal.org/comment/8009717#comment-8009717

b) Wysiwyg + Ckeditor -: https://drupal.org/node/1956778 (patch 37)

  • Yes, my question is how to apply particular image styles using Media + Wysiwyg, as in the question title. I'm not sure if you're confirming the approach I listed or not. In your first sentence above, did you mean to say "view modes" is the right option?
    – Dave Bruns
    Nov 5, 2013 at 0:01
  • Yes, confirming your approach. It's exactly what view modes should be used for, but you will have to do this for all the image styles that you want. Nov 5, 2013 at 0:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.