Using LaTeX all pictures will be indexed automatically and tagged with successive numbers when using the figure environment and the graphicx package. The figure environment takes care of the numbering and positioning of the image within the document. It takes the image width as an option in brackets and the path to your image file. As a result smaller pictures are upscaled and larger pictures downscaled respectively. As I mentioned before the brackets contain the path to the image.
For guidance on the syntax for doing this, see Help: In very brief summary, one hurdle that trips up many people when attempting to add an image to an infobox template is that most internally provide the wiki code that "wraps" the image. Adding such extraneous code will cause many infoboxes to break. Thus, and for example, if File: Thumbnails Instructions on this page may not work with VisualEditor.
You can also use imread to get the image array from a file. An RGB triplet is a three-element row vector whose elements specify the intensities of the red, green, and blue components of a color. The intensities must be in the range [0, 1]. Existing message boxes with the same title remain.