I would like to realize a View that shows, randomly, 5 images taken from Image field in y content type. I've tried but i only see the images from a single record, i would need to show ALL of them together. Is it possible?
2 Answers
If you have 2 pieces of content. And each piece of content has 5 images against field_example. And you would like to construct a gallery of the 10 images.
You need to amend the 'format settings' of the view using views ui to 'show' as 'fields', if you have not already.
Add the field. 'field_example'
Click the field 'field_example' in the views_UI to get it's associated settings.
Uncheck "Display all values in the same row" under the fields 'multiple field settings'
NB: it is possible to choose these settings when you add the field in the first place. I am assuming you already have the field.
Follow below steps to resolve your issue.
- Create a new view of type files.
- Add Filter File:Mime Type and select the condition as Contains any word.
- Give all image extensions in the value like jpeg jpg png etc
- Rewrite the results of the File Path field and add img tag with src as file path.
Using above instructions you can list all images in Drupal independent of any content type or image field.
-
Works great! You can add field 'File: Render' to view the image without an rewrite. Just how would you render a certain image style?– jorisxCommented Mar 13, 2016 at 17:07