Showing images in a Drupal view of files

Pretty much every Drupal site I build uses views to a large extent, and these days generally media is ever-present as well.

A common use case is building an image gallery, and it makes sense to use the file entities directly, rather than creating nodes whose sole purpose is to hold the image.

The trouble is, it isn't obvious immediately how to get images displaying when building a view of files.

The file and rendered entity options in the views form don't deliver what you expect, and generally just show a link to the file.

The key is to enable image display for the image file type, at Structure > File Types > Image > File Display. Once you've done that, you can set image style options for each display mode.

This isn't set up by default, and it's easy to overlook if you're generally just using images attached to nodes.

Tags: 
All tags