I’ve a list of empty divs and dynamically inserting a background image – so at first, their background-image: url(); property is completely empty. With some event, it’s background-image url loads into the previously empty background-image: url(); tag. The url of the appearing background-image is temporarily stored in the “alt” tag of the div:
<div style='background-image: url();' alt='http://something...'></div>.
I’m doing so to get round corners on several animated gifs without using transparent gifs (no smooth edges).
Question: does Google robots index those images? I could imagine they do because the url is already stored in the html code and not in some external css-file, however not as “img” tag but as “alt” or “something” tag!?
I think @Paolo’s answer is correct in general, but some bots might look for any kind of image resource referenced in the page – it’s not unthinkable, and certainly not unethical.
If you want to make sure no search engine indexes the images, you can set up your robots.txt file to block them.
If you want to make sure bots do index them, you could for example set up a page containing
<img>tags with all the images, and put an innocuous link to that page onto your front page.