I would like to arrange images in a beamer presentation without having to set them in a predefined position. Is there a package or a fast way to place randomly into the beamer a given number of images?


I would like to move them in the beamer and not having them on the same line.

  • 1
    Welcome to TeX.SX! Please provide a minimal working example (MWE) to demonstrate your set-up. – Andrew Swann Mar 7 '15 at 14:47
  • How move, during presentation or while preparing the document? – AlexG Mar 7 '15 at 15:29
  • I updated my answer with a command allowing you to use any number of images. – Gonzalo Medina Mar 7 '15 at 17:27

You can use TikZ's nodes and rnd to randomize the position; the command \PlaceImageRnd has as mandatory argument a comma separated list of the image name files:


The line

\pgfmathsetseed{\pdfuniformdeviate 10000000}

makes each run of the code to update the locations.

The code:


  \pgfmathsetseed{\pdfuniformdeviate 10000000}
  \foreach \Image in {#1}
    \node at (10*rnd,6*rnd) 




On the first run I got:

enter image description here

  • Is it possible to ensure the nodes don't overlap? – Croolman Jun 11 '19 at 8:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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