Contrary to earlier assumptions, Google does use the title attribute for indexing and ranking purposes in image search. This has been proved by a recent test.
In principle you are free to use the alt and the title attribute for images in HTML. While the alt attribute works as kind of a placeholder that is applied when an image cannot or should not be displayed - as it is the case with visually impaired people - the title attribute provides for displaying a tooltip in the browser on mouseover for the respective image. How these attributes can be applied for an image tag in HTML is shown by the following example: <img src="/smiley.gif" alt="Smiley" title="Smiley" height="42" width="42">
While the meaning of the alt attribute for image search is undisputable, until now it hasn't been clear if Google also uses the title attribute for indexing and ranking in image search. A recent post of John Mueller on Twitter didn't provide clarity:
Mueller suggested to test a possible relevance of the attribute for oneself. This is what Dawn Anderson has done recently. She posted the astonishing results of her test on Twitter: Google does index the title attribute - and uses its content for ranking purposes in image search. The source code Anderson used is shown in the subsequent snippet:
The title attribute's content was chosen in a way that with a high probability it hadn't been indexed by Google before. An image search for the respective content after publishing the test page lead to a corresponding result, which proves that Google uses the title attribute for indexing as well as for searching purposes.
For all people doing image SEO this means that they preferably use both alt and title attribute for their images. Depending on the context and the kind of the respective images, you are free to use different content for these attributes.
Cover image © twystydidg - Fotolia.com