Do search engines prioritize file names or "alt" attributes in images?

Asked

Viewed 39 times

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.

  • 1

    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 attribute alt has more weight because it is a plain text, which usually represents more information than a filename can. The attribute longdesc would also go into line.

  • 1

    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)

  • 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.

  • 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.

1 answer

2


The search engine indexing algorithm gives one weight for each item and another weight for the combination of items. It would be better to have both. The objective file name and the most complete alt. If you had to choose, it would be according to the length of the text. Shorter in title, longer in ALT.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.