Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Our website mainly consists of galleries, while usually smaller, they sometimes reach over 100 images per post. As each image is bound to the same topic, they are automatically named after the post title and an added incremental number at the end, for example:


League of Legends Sona Cosplay By Eki

Image names:



At first, all of those had the page title set as their alt text and everything was fine for a long time like that, but then I got scared that Google might find that keyword stuffing or something, so I removed all the alt tags and they are now alt="". This seems like a really bad practice, so I was wondering what could I do to fix this and I came up with an idea to simply use the file name as an alt tag, but this still leaves a lot of duplicate content issues if you ask me.

I am not trying to trick Google into ranking better, but merely trying to protect the site from any penalties that could arise from all the images there.

share|improve this question
I know this webmasters.stackexchange.com/questions/44544/… was a similar question, but I didn't want to stuff two things into one for anyone that might be searching for the same thing in the future. – Dejan Pelzel Mar 7 '13 at 9:37
up vote 2 down vote accepted

If you really suffer from hundreds of images per post title and need to add alt attributes, you are left with a couple of scenarios on how to deal with it:

  • Add alt attributes to first page images and no alt-tags for all subsequent pages for each topic (if you have hundreds of images on a single page, you got other problems to deal with anyway)
  • Use logic to break alt attributes and have some sort of rewrite rules to change alt attributes based on topic. For example, you could add "Uploaded by username", have League of Legends abbreviate sometimes to "LoL" and have only every second or third alt attributes get populated.
  • Google doesn't even use alt attributes on their image search, but instead use data attributes and have javascript overlay the image with the data associated with it.

On the other hand, what good are 247 alt attributes which are more or less the same? These are supposed to help users, and if that's not the case, just leave them out entirely.

share|improve this answer

You could just add - Image XX to the end of the Alt tag for each image after the first. So you'd basically end up with:

League of Legends Sona Cosplay By Eki
League of Legends Sona Cosplay By Eki - Image 2
League of Legends Sona Cosplay By Eki - Image 3

This way at least give you (slightly) different Alt tags, and it's actually understandable to users who see it (e.g. blind browsers with a screen-reader).

share|improve this answer
It doesn't fix keyword stuffing thing. – Zistoloen Mar 7 '13 at 11:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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