4
For example, an image named "xicara-de-cafe.jpg"
without the attribute alt
, has more weight than a file called "5ecaac15bb162ea847e1f4771a214b74.jpg"
with the attribute alt="Xícara de café"
?
Respectively:
<img src="/uploads/xicara-de-cafe.jpg" />
<img src="/uploads/5ecaac15bb162ea847e1f4771a214b74.jpg" alt="Xícara de Café" />
Which of the two codes will be indexed best by the search engines?
Just out of curiosity, the second filename is the MD5 hash of the first.
The best would be to use both: having the image name and descriptive text in
alt
(and possibly the title too). Now, which one has more weight, I find it hard to say. Probably the attributealt
has more weight because it is a plain text, which usually represents more information than a filename can. The attributelongdesc
would also go into line.– Woss
I disagree, they’ll get the name of the file, the
alt
is a descriptive alternative to an image when it is not available...(I may be wrong)– MagicHat
I understand that the use of the two is the best, but let’s assume that I need to choose between one or the other. Which would be better? The doubt arose due to the need to treat image names of a blog system. Some images are being sent with very long names, but they all contain a suitable alt attribute. So I thought I’d leave all names with MD5 and keep the alt attribute.
– Renan Cavalieri
I think there’s no problem with that, no. The Google also indicates the use of both, so I believe it is best to find an alternative to this. Also cites the use of Sitemaps to assist.
– Woss