In Chapter 5, JavaFX Media, we have seen how to load a single image from a given location. However, in certain situations (think of game development, or dynamically building a GUI), you will find it necessary to load multiple images into your application. If you are loading three or four images, then there are no issues. If however you have, say, 30 or 100 images to load on the scene graph, that will definitely be a motivator to find an easy way to load them (yes, good developers are lazy and will look for ways to keep things simple, repeatable, and efficient).
This recipe shows you how to load multiple images into your application easily, and make them available for programmatic manipulation and display. Although this recipe does not use JavaFX's Production Suite tools, it presents an alternative approach for working with a large set of image assets that may have been imported or generated by your creative team for your JavaFX project.