Alt text (alternative text) is the value of the alt attribute on an HTML img element. It describes the image's content in words, appearing as a substitute when the image fails to load and serving as the description screen readers convey to visually impaired users.
Alt text is a fundamental web accessibility requirement. Success Criterion 1.1.1 (Level A) of WCAG (Web Content Accessibility Guidelines) 2.1 requires that all non-text content presented to the user have a text alternative that serves the equivalent purpose, and the criterion carries over unchanged into 2.2. An image without alt text is effectively an invisible blank for screen reader users.
From an SEO perspective, alt text is equally important. Google's documentation for Google Images explains that it uses alt text together with the contents of the page and computer vision algorithms to work out what an image depicts, and that alt text also acts as anchor text when an image is used as a link. Well-written alt text can bring in traffic from image search, but it is not the only factor that decides how an image ranks.
In the context of URL shortening services, the description attached to an OGP image is the equivalent. The Open Graph protocol states that a page specifying og:image should also specify og:image:alt, defined as a description of what is in the image rather than a caption. With that description in place, the thumbnail shown when a link is shared on social media still conveys its content to people who cannot see the image. For QR code images, write what the code leads to, as in "QR code linking to [destination]." Dropping the raw URL string into the attribute turns it into a run of symbols when read aloud and conveys nothing.
Good alt text describes the image concisely and specifically. Avoid redundant phrases like "image of" or "photo of" and instead directly state the information the image conveys. For purely decorative images, set an empty alt attribute (alt="") so screen readers skip them.