Rename each image on your computer before you upload it to WordPress, with a few words that describe what the image shows. A file called IMG_4821.jpg tells nobody anything, whereas boats-with-rainbow-flags-during-pride-amsterdam.jpg describes the photograph to you, to WordPress and to search engines.
WordPress uses the file name as the title of the image in the ‘Media Library’, so a descriptive name makes an image easy to find again among hundreds of others. Search engines read the file name too, but Google says a file name gives only ‘very light clues’ about the subject of an image. The alt text matters far more.
How should an image file be named?
Describe what is visible in a few words, in the language of the page, and separate the words with hyphens. Keep the name short, as Google advises file names that are ‘short, but descriptive’. Rename the file in Finder on a Mac or in File Explorer on Windows before you upload it, as the file name of an uploaded image cannot be changed in WordPress.
Which fields does WordPress fill in from the file name?
WordPress itself only fills in the ‘Title’. The ‘Alt Text’ field stays empty unless you fill it in, and alt text is what a screen reader reads aloud to someone who cannot see the image. On websites built by us, the theme also fills in ‘Alt Text’, ‘Caption’ and ‘Description’ from the file name when the image is uploaded, with the hyphens replaced by spaces. A descriptive file name then gives every image alt text straight away. Check the alt text once the image is uploaded, and add to it where the file name alone does not describe what the image shows.
If your ‘Media Library’ is full of names like IMG_4821, there is no need to fix them all at once. Improve the alt text of the images on your most visited pages first.
