File names matter before you upload
Name files like you'll never see them again
You upload `IMG_2847.jpg` and the CMS shows you a nice preview. You add alt text, maybe a caption, and move on. Six months later you need to find that image again and you're scrolling through a media library full of `DSC_0041.jpg` and `Screenshot 2024-03-15.png`.
File names are metadata. They show up in URLs, in backend lists, in your browser's download folder when someone saves an image. They're searchable. They're sortable. They matter before the file ever touches your CMS.
Rename the file on your desktop before you upload it. Every time.
Use words that describe the content
Not the project, not the client, not the date you took the photo. Describe what's in the image.
`team-meeting-whiteboard.jpg` is better than `IMG_2847.jpg`. `product-blue-ceramic-mug.jpg` is better than `Final_v3.jpg`. If you need the same subject from multiple angles, add a modifier: `office-exterior-south.jpg` and `office-exterior-entrance.jpg`.
Keep it short but specific enough that you'd recognize it in a list. Aim for two to four words.
Lowercase, hyphens, no spaces
Spaces become `%20` in URLs. Underscores are fine but hyphens are more common and slightly easier to read in a URL. Lowercase avoids case-sensitivity problems if you ever migrate platforms or reference the file in code.
`Team_Meeting_2024.JPG` becomes `team-meeting-whiteboard.jpg`. It's not precious, it's consistent.
If your CMS auto-converts spaces to hyphens, great. Do it yourself anyway so you know exactly what the file will be called.
Version numbers only when you mean them
Don't upload `hero-image-final-FINAL-v2.jpg`. If you're replacing an image, replace it. If you're keeping both versions, the file names should explain why: `homepage-hero-summer.jpg` and `homepage-hero-winter.jpg`, not `v1` and `v2`.
Version numbers suggest you'll remember which version is which. You won't.
Make it a habit, not a cleanup task
Renaming files after upload is tedious and easy to skip. Most CMS platforms let you rename, but now you're doing it in a web form instead of your file system where batch renaming is faster.
Rename before you upload. Every image, every time, even if it's "just a placeholder." Placeholders have a way of shipping.
You're already [resizing images before upload](/posts/stop-resizing-images-by-eye). Add file naming to the same checklist. Two seconds now saves ten minutes of searching later.
It shows up in more places than you think
File names appear in:
- Media library search results
- Image URLs (unless your CMS aggressively obfuscates them)
- Browser download dialogs when someone saves your image
- Alt text suggestions if your CMS pre-fills from file names
- Backend audit logs
- Backup archives
A clear file name makes all of these more useful. A messy one makes all of them worse.
The rule
Descriptive words, lowercase, hyphens, before upload. Not after, not sometimes, not when you remember. Before.
Your CMS will thank you. Your future self will thank you. The person who inherits your site will definitely thank you.