Images are downloaded via links from the
src attribute, as well as from
data-original attributes (in this case, an image link in the
src attribute is not required).
Search results may include any image that the site does not prohibit from indexing in its robots.txt file, as well as images posted on pages that robots.txt does not prohibit from indexing.
Yandex finds images that best match the user's query. Various information is used to search for images, like captions. If the images don't have any informative descriptions, they may be excluded from the search results. However, image captions aren't the only ranking factor, so the words from the query may be missing from the pages that contain the images.
Yandex only indexes images in standard image file formats (JPEG, GIF, and PNG). Images set as a background or fetched by a script are usually not indexed. To index not easily accessible content, you can use the Sitemap file.