Image optimization, tips to manage alt texts and file names

Put us to the test
Put us to the test!
Analyze your site
Select the database

Everything can be SEO, and certainly the targeted and conscious use of images can make any content more interesting and appealing, helping readers understand the topic better than using only the textual part. In particular, images add value to our SEO efforts by increasing user engagement and site accessibility. Indeed, it is not enough to ensure that images load quickly or are visually appealing, but we must also work to make them accessible to all users, including those who use screen readers due to visual impairments. Alt text, or alternative text, plays a key role in this context, and so we focus precisely on alt text and filename to find out what they are, how they differ, and best practices to put into practice for their management.

What is the alt text of images

Alternative text or alt text is a short written description that is provided as an attribute in HTML images.

Leaving aside the linguistic aspect, alt text is a textual string that is used to describe an image to “alternative” sources and to ensure maximum accessibility of resources, according to W3C guidelines, which call for text that does not have to “necessarily describe the visual characteristics of the image itself, but convey the same meaning as the image.”

In fact, this text has the primary purpose of describing the image and its context, serving as a substitute if the image cannot be displayed.

Writing SEO alt texts has never been easier

SEOZoom’s Editorial Assistant walks you through the optimal management of content and alt texts
Academy
Webinar
Tools
Registrazione

The use of alt text is simple: you add the alt attribute within the image’s HTML tag, followed by the relevant description, which is generally not visible to users of the page. Small footnote: Although it recurs often in the language of optimizations, in reality the term alt tag is improper and does not exist, because alt text, or alt text, is more accurately the alt text attribute of the HTML tag that identifies an image.

What is the alt text for and why it is important

The purpose of the alternative text (alt) is to convey “why” that image is in relation to the content of a document or web page.

We said that it is “generally” not visible to users: in fact, it performs its function in very special cases, essentially when users, for a variety of reasons, cannot view images properly. Alternate text is precisely the part of the content that is read aloud to users by the screen reader software or that appears on the page if the image does not load properly or is missing.

Its main goal is to make images more accessible to all users, and in practice, inserting alt text allows us to set up a description of the image that is read via an audio prompter and tells people with visual impairments and low vision what currently appears on the page.

In addition, this alt text can also describe the image for people who have technical difficulties in viewing the resource, due, for example, to browsing in areas with insufficient connection to load heavy resources or from outdated devices, or by choice to disable the display of images in the Web browser application: in these cases, the set text string appears on the page instead of the blank space.
Come appare un'immagine non caricata - alt text visibile a causa di risorsa non trovata

From a technical point of view, then, it satisfies user agents who cannot even “see” images, allowing search engines to improve their understanding of the relevance of the content topic. In fact, alternative text provides better descriptions and contextual information about the page content to search engine crawlers, helping them to properly index and rank an image in image search-which is why it also plays a role in SEO.

To summarize, therefore, alt text is important for at least 4 reasons:

  1. They improve accessibility.
  2. They can improve the relevance of the content.
  3. They are an important part of Google Image Search optimization.
  4. They can be used as anchor text for image links.

Alt text and SEO: why to care for alternative text in images

It is therefore clear why correctly inserting the alternative text is always one of the first tips to optimize images for SEO and to try to improve the ranking on Google Images; in this sense, we must avoid three mistakes that may compromise the performance of our content, namely:

  1. Not entering the alt text, that could cause problems to screen readers, who have no way to communicate the image content to the visually impaired user, reading at most the name of the image file that could be generic or inappropriate.
  2. Jam pack the alt text with useless keywords, not relevant and not descriptive of the image.
  3. Adding the alt text to all images. As said, the alternative text serves to communicate information to users: in case of purely “decorative” images, without special meanings, it is not necessary to insert the alt text, which could only be a nuisance to visitors with screen reader and still does not add any SEO value.

Managing the alt text of images: the most complex cases

The alt text resides in the HTML code, as mentioned, and to implement it technically you simply have to insert an alt attribute to the <img> tag, such as <img src=”house.jpg” alt=”house with red bricks”>.

Much more simply put, modern CMS like WordPress offer the opportunity to change the alt text without having to work on the HTML code, going to insert the text in the appropriate field between the settings of the images added to a page or article.

However, there are some specific cases that need additional attention, with a view to making the text efficient and useful.

Specifically, in the “standard” case an image of a cup of coffee on a table might have alt text such as “Steaming cup of espresso on a rustic wooden table.” Depending on the type of site, however, we might emphasize one aspect or another: for example, a furniture e-commerce site might describe the type of table more, while a site that allows customization of mugs would highlight precisely this possibility.

Even more “thorny” are three other frequent cases:

  • Images with Links. When an image serves as a link to other pages, the alt text should describe the destination of the link rather than the image itself. For example, if a company logo is linked to the homepage, the alt text could be “Back to the homepage of [Company Name]”; conversely, it makes no sense or value to describe a question mark image that links to a help page with a didactic alt text such as “question mark.”
  • Icons. For icons, the alt text should communicate the function of the icon, not its visual description. If the icon is purely decorative and does not add information, it may be appropriate to leave the alt text blank (alt=””).
  • Complex images such as Infographics. For complex images that contain a lot of information, such as infographics, it may be useful to provide alt text that summarizes key points and, if possible, provide detailed equivalent text elsewhere on the page or via a link to a full description.

How to write effective and useful alt text

On the SEO Copywriting front, there are some tips and best practices for writing good alt text, that is, a sentence designed with targeted keyword optimization in a context that describes the topic of the image:

  • Brevity. Long alt text can annoy screen reader users, so it is best to use as few words as possible to describe the image. Ideally, the alt text should be short (about 125 characters) to ensure that screen readers read it in its entirety without cuts.
  • Accuracy. The text should accurately and precisely describe the image, providing a clear and concise description of what is depicted. For example, instead of “dog,” an optimized alt text might be “labrador dog running in a park.”
  • Clarity. This is not a space for keyword stuffing, but for explaining the image to those who cannot view it. It is important to include relevant keywords, but they should be included naturally and only if relevant to the image.
  • Avoid redundancy. Google and screen readers understand that the resource is an image-so there is no need to write “image of” or “photo of” in the alt text. Similarly, if the context already makes it clear that there is room for an image, the alt text should not repeat the same information.

Writing effective alt text takes practice and care, but following these guidelines can help make our site more accessible while potentially improving the visibility of our content online.

What is the title of the image

But the alt text is not the only fillable text field, in terms of SEO optimization, since there also are file names, captions and title text of images that require attention.

The caption, for instance, is the text that appears in the vicinity of the image and can be used to describe it better for readers (and is therefore different from the alt text, which as said is not visible on the front end of the site and is useful for some specific users), but it does not always serve and can be omitted (especially if the context already sufficiently clarifies the visual resource).

The title text or text title of the image, on the other hand, is an attribute used to provide additional information about the image, even if it does not serve in terms of search rankings and therefore has a minor role in the optimization work: the best practices to write an effective title suggest to choose a short sentence, direct and captivating, that perhaps integrates what we have already optimized for alternative text.

Finally, we have image file names, which, often underestimated, can actually play a significant role in the SEO and overall accessibility of a website: a well-chosen file name that accurately reflects the subject or element depicted can in fact provide search engines with additional clues about the content of the image, improving the relevance of the page for certain search queries.

SEO best practices for image file names

A well-chosen file name is an invitation to find out more about what the image represents.

According to SEO best practices, the first “rule” is therefore to choose filenames that are descriptive and specific: a filename such as “IMG_12345.jpg” tells search engines and users little or nothing, while “cat-persian-sleeps-on-sofa.jpg” provides immediate and useful context.

Incorporating relevant keywords into the filename can help improve the image’s visibility, but it is critical to avoid the temptation to over-optimize. Balance is key: keywords should flow naturally and reinforce the image description, not overload it.

When it comes to separating words in file names, hyphens (-) are SEOs’ best friends. Unlike underscores (_) or spaces, hyphens are interpreted by search engines as spaces, which makes file names more readable and understandable. This little trick can help clarify the meaning of the file name for both users and search algorithms. Also with this in mind, special characters should be avoided as a technical necessity: characters such as &, %, $, @ and the spaces themselves can be confusing to browsers and servers, leading to loading errors or broken links.

Brevity is another crucial consideration: a long, complicated file name can be difficult to read and remember, while a concise approach is more manageable and, at the same time, increases the likelihood of the text being read and interpreted correctly by search engines.

Again, we must not neglect consistency, and therefore keep a similar naming structure throughout the site-this helps maintain organization, makes it easier for search engines to understand and categorize images, and can improve the user experience for people who intend to browse and search for resources on the site.

Finally, it is essential that the filename is in sync with the context of the page on which the image is published: this consistency between page content, filename, and alt text can strengthen the SEO signal and contribute to a more coherent and compelling digital narrative.

Respecting user intent and user experience in the optimization of images

The basic advice that comes from this guidance is that guiding our work in optimizing the textual side of images should be considerations related to satisfying user intent and user experience, as Brian Harnish also suggests, and thus not just keyword targeting.

This means first of all not doing keyword stuffing and, secondly, changing keywords when appropriate. In addition to following the best practices for images recommended by Google, according to the expert there are three precise questions that we should ask when we optimize alternative text and titles in images:

  1. Will alt text and title text help my users?
  2. Will these alternative text and text title satisfy the user’s intent?
  3. Will these texts improve the user experience?

How to optimize the file name

The last piece to consider is the name of the image file or file name, which helps Google to more precisely assess what is the subject of an image.

As Harnish says, “optimizing file names based on optimizations of alt texts and title texts can provide greater understanding, which will help images to rank in image search”.

On the practical side, in most cases it is not necessary to insert long filenames with long descriptive text: it is enough a key phrase that describes the image synthetically and precisely, making sure that the text of the file name accurately reflects the image topic.

Improving images is a part of the work on the UX

Ultimately, the work of image optimization has a relevance to the SEO and, in particular, to the ranking on Google Images, but we must not lose sight of its primary goal, which is to improve the user experience.

Academy
Webinar
Tools
Registrazione

Simplify and improve your work

Make your alt texts and content perfect with the Editorial Assistant

Indeed, remember that SEO should not only achieve the direct goal of ranking well in search engines, but also provide an excellent user experience, which includes the accessibility and comprehensibility of the content offered. Good alt text is that which succeeds in balancing search engine optimization with accessibility for users-and so, in addition to including relevant keywords, alt text should be designed to enhance the user experience, especially for those who depend on assistive technologies.

Therefore, it is definitely important to properly optimize images and learn the right techniques to do so, but without spending too much time on these aspects at the expense of others with a higher priority within our online marketing strategy.

Iscriviti alla newsletter

Try SEOZoom

7 days for FREE

Discover now all the SEOZoom features!
TOP