When you upload images with messy names, spaces, or uppercase letters, WordPress creates broken URLs and messy media links. Strange symbols like “%20” make your links look sloppy in search results. KO Clean Image Filenames lets you clean image filenames in WordPress automatically on upload.
You can upload screenshots and graphics without renaming files on your desktop first. This tool is part of my collection of free WordPress plugins built to keep your media library clean and organized.
- Version: 1.0.0
- Requires WP: 6.0+
- PHP: 7.4+
- Frontend Assets: 0 KB
- License: GPLv2
Why I Built KO Clean Image Filenames
Renaming dozens of screenshots and blog graphics by hand on your computer before uploading is a big waste of time.
Heavy media plugins that offer filename cleaning usually charge monthly fees or bundle heavy compression tools you don’t need.
I built this micro-plugin to clean filenames right at the upload gate. It turns uppercase letters into lowercase, replaces spaces with clean dashes, and strips weird symbols on the fly.
How to Sanitize Media Upload Filenames Automatically
Here is how this tool cleans your media files:
- Converts to Lowercase: Turns all uppercase letters into lowercase characters for clean URLs.
- Removes Spaces: Swaps spaces and underscores for clean hyphens to stop “%20” errors.
- Strips Special Symbols: Removes accents, umlauts, and strange punctuation that break browser links.
- Runs on Core Filters: Sanitizes files before they touch your media library so your database stays tidy.
- Zero Frontend Script Weight: Operates entirely on backend PHP with 0 KB of frontend scripts.
- 100% Free & Open Source: Released under the GPLv2 license with full source code on GitHub.
How to Install and Set Up KO Clean Image Filenames
Setting up filename sanitization takes less than two minutes:
- Download the ZIP: Grab the latest
ko-clean-image-filenames.zipfile using the download button above. - Upload & Activate: Head into Plugins -> Add New Plugin -> Upload Plugin in your dashboard, pick the zip file, and click Activate.
- Check the Dashboard: Open up KO Plugins -> Dashboard to make sure Clean Filenames is toggled to ON.
Once active, any graphic, photo, or screenshot you upload will be cleaned automatically.
Frequently Asked Questions About KO Clean Image Filenames
Does this plugin rename images I already uploaded in the past?
No. It sanitizes new files as you upload them. It leaves older media links untouched so existing post images don’t break.
Does this work for PDF files and other documents?
Yes. It cleans filenames for all media uploads, including PDFs, audio files, and video clips.
Will this compress or change the quality of my images?
No. It only fixes the text in the filename. Your image quality and pixel dimensions remain untouched.
Can I use this plugin on client websites?
Yes. KO Clean Image Filenames is licensed under GPLv2, so you can use it on any website.