Why filename matters.
Google can use image filenames as an additional clue about what the image depicts. Together with alt text, surrounding text, and other page content, the filename helps search engines index your images more accurately and potentially rank them higher in image search results. While the impact on overall page SEO may be limited, optimizing filenames can still be beneficial—particularly if images play a significant role on your site (e.g., e-commerce product photos).
Dashes vs. underscores.
It’s generally recommended to use dashes (hyphens) rather than underscores in filenames. Google treats a dash as a word separator, while underscores are less clear as separators. For instance, sunset-over-lake.jpg is more likely to be interpreted as “sunset over lake” than sunset_over_lake.jpg.
Should you include dates?
Using a date in the filename (e.g., 2024-11-23-sunset-over-lake.jpg) isn’t a problem, but it’s usually optional. If the date itself is meaningful to the content (e.g., for news, time-sensitive events, or seasonal images), it could be useful. Otherwise, it’s often better to keep filenames concise and descriptive of the image subject matter.
Wrapping it up.
- Descriptive image filenames can marginally help SEO, especially for image search.
- Use dashes between words, rather than underscores.
- Only include dates when contextually relevant; otherwise, concise keyword-based filenames are preferable.