I have a single image that I am using repeatedly with different text overlaid. If you hover over this image it will also give you a tooltip with more information. Of course, the text overlaid could also be put in the alt tag, and the longdesc tag could have all the information in the tooltip. Is this advisable, or will google penalize it for duplicate content or otherwise going overboard?

For that matter, what about naming the file? Obviously if each of them has its own name they all have to be loaded as separate images, meaning load time will be increased; I assume that isn't worth it just for the benefit of a descriptive name?

1 Answer 1


You don't make any mention of the technique you're using, so there's some necessary vagueness here.

If the actual image is identical, then yes you should just reuse the one file.

If possible, put both strings directly in the markup and then use CSS/Javascript to display them as and where needed. That would give you both predictable crawlability, and maximize styling options. (You also didn't specify whether your text has markup, for example, which is troublesome in attribute values.)

Using the alt attribute is not appropriate for what you're doing here, as it's intended to actually replace the image if it doesn't load. It should describe the actual content of the image, not be some kind of title for it or whatever. Technically, the alt text is the image, if the visual representation happens to not load. From that perspective, changing it in different cases makes little sense.

If you want, though, you could stash the shorter overlaid text in the title attribute of the image instead of its own element; that seems relatively appropriate to your actual use case.

Support for longdesc is so poor I'm not aware of a single reference saying to use it for anything. It's also not even in the HTML5 spec, if that's a concern; you don't say what doctype you're using.

If you are using HTML5, then the longer description could be stored in a custom data attribute.

  • Thanks for the help, as I'm sure you figured out I'm rather new to SEO. So just to make sure, having the same data both in the string and the title will aid a little bit in the best case scenario and do nothing in the worst case scenario? I just want to make sure I won't be penalized. =) Commented Apr 22, 2013 at 16:04
  • I doubt it'll aid to put it in both places. (I actually intended that as an either/or situation; again, I don't know anything about your current implementation so had to cover several options.) But it probably won't matter if you do. Made a slight edit.
    – Su'
    Commented Apr 22, 2013 at 17:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.