Skip to content

Black Friday 50% off your first year on all premium plugins and the Suite.

See the deals

How file names become alt text

The exact clean-up ByteKeel PixTag applies to a file name, with before-and-after examples and tips for naming files.

1 min read · Updated 6 November 2026

The steps, in order

  1. The file extension is removed (.jpg, .png, .webp…).
  2. Underscores and hyphens become spaces.
  3. All numbers are removed.
  4. Special characters are removed — letters, spaces and basic punctuation (. , ! ? - ' ") stay.
  5. The words img, image, photo, picture, file and document are removed wherever they appear as whole words.
  6. The text is converted to Title Case.
  7. Extra spaces are collapsed and the ends trimmed.
  8. The result is cut to the character limit (125 by default) at a word boundary where possible.

Examples

blue-linen-tote-bag.jpg       →  Blue Linen Tote Bag
barista_pouring_latte_art.png  →  Barista Pouring Latte Art
hero-banner-2023.png           →  Hero Banner
team-photo-about-us.webp       →  Team About Us
IMG_4021.jpg                   →  (nothing — ByteKeel PixTag reports an error)

Name files for the alt text you want

Because numbers are removed and words like “image” and “photo” are dropped, IMG_4021.jpg or DSC0042.jpg leaves nothing to work with, and ByteKeel PixTag logs “Could not generate from filename.” A name such as barista-pouring-latte-art.jpg becomes a useful description on its own.

  • Describe what is in the picture, not where it goes: red-ceramic-mug-on-oak-table.jpg, not homepage-hero.jpg.
  • Spell numbers that matter as words — “six-seater”, not “6-seater” — because digits are removed.
  • Rename before uploading. Renaming the file later does not change alt text that already exists.

When the file name is not enough

Add page context with a template, or let ByteKeel PixTag Pro describe the picture itself with AI.

Did this answer the question? No — open a support request