Giving proper credit for images has two parts: a caption with the image itself, and an entry in your bibliography/ cited references list. Where the image appears, write a descriptive caption indicating the source of the image. Then create an entry in your bibliography.
While most citation styles do not give a rigid format for citing images, you can construct informative citations based on some or all of the following elements:
Artist's name (if known)
Title of the image (if known; if not, create a description & place in square brackets)
Institution where the photograph or original artwork is held (if applicable)
If taken from a book or journal: all the usual citation information – refer to the appropriate style guide
If taken from an online database: aatabase name, date of access, URL (if applicable)
If taken from the Internet: title of website (if it has no title, create a descriptive one and place in square brackets), date of access, URL
Concentrate on creating the best citation you can given the information you can locate. The intent is not to frustrate you with intricate rules, but to give you guidelines so that you can provide your reader with enough information that they can track down the original image if they so choose.
To create a citation for a table, chart, or image within the list of references, list the reference number and cite according to the format for the type of source where you found the image (e.g., image found in a journal would be cited in the journal article format).
In-text citation example:
The evolution of Harvard's RoboBee project is seen in [2, Fig. 1].
 B. M. Finio and R. J. Wood, "Open-loop roll, pitch and yaw torques for a robotic bee," 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems, Vilamoura, 2012, pp. 113-119. doi: 10/1109IROS.2012.6385519
Note: if you create your own figure or table, you will refer to it in the main body of the paper. You will not have a reference.
Copyright vs. Permissions vs. Creative Commons
The guidelines offered here should be taken as suggestions, not as legal statements.
Copyright and Fair Use
The re-use of images for educational purposes (not including print or electronic publication of any kind) is generally considered acceptable under the terms of fair use. If you wish to publish images online or in print, even if for educational purposes, you will first need to determine whether or not the image is protected by copyright, then find out how to get copyright clearance.
Password-controlled web sites with access limited to the Cal Poly community generally fall within the bounds of educational fair use.
You may also need to obtain permission to publish from the institution that owns the image in question, whether or not the image is in the public domain. This is particularly the case for images found in licensed databases, such as ARTstor. ARTstor has a very clearly-worded permissions statement, as do other licensed databases. In most cases, you will need to write to the institution that owns the physical image (that ARTstor, for instance, includes) and request permission to publish it. There is often a fee associated with acquiring permission to publish.
Example of a museum statement on rights, terms and permissions of image use for works in its collections:
Art Resource (manages licensing for major art museums and archival collections)
Creative Commons "provides free tools that let authors, scientists, artists, and educators easily mark their creative work with the freedoms they want it to carry." You can use CC to change your copyright terms from "All Rights Reserved" to "Some Rights Reserved."