implements get_image function, applies to all entries from names.txt