2

I have an image field that allows unlimited values, and I need to use Views to display a random image from a node's image field. The View should display a random image from that node's field each time the page is reloaded. How can this be accomplished?

Example:

  • On page load, display image "1" from Node A's multi-image field.
  • Reload page, display image "3" from Node A's multi-image field.
  • Reload page, display image "2" from Node A's multi-image field.
  • Reload page, display image "3" from Node A's multi-image field.

Thanks!

1 Answer 1

4

Re-querying with Views for information you already have is excessive. I think a better option is to use something like Single Image Formatter which can display a random value from a multivalue image field.

1
  • 1
    Thanks, that is just what I was looking for! I used Single Image as the field formatter and left that field's "Image to display" value blank. I also had to leave the "Display __ Values" in the "Multiple field settings" for the image field blank, essentially instructing the field to display all of the values for that field.
    – hockey2112
    Sep 23, 2015 at 21:17

Your Answer

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

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