Skip to content

Releases: ivanusto/smart-file-renamer

Release v1.3.0

Choose a tag to compare

@github-actions github-actions released this 04 Sep 06:34

Full Changelog: v1.2.3...v1.3.0

Full Changelog: v1.2.3...v1.3.0

Full Changelog: v1.2.3...v1.3.0

Release v1.2.3

Choose a tag to compare

@github-actions github-actions released this 20 Aug 10:08
9cb9d53

What's Changed

  • Leave WordPress 7.1's sideloaded files alone by @ivanusto in #1

New Contributors

Full Changelog: v1.2.2...v1.2.3

Release v1.2.2

Choose a tag to compare

@github-actions github-actions released this 06 Aug 15:57

Bug fix — please update

Renaming was hooked to WordPress's global sanitize_file_name filter. That filter is not upload-specific: WordPress core, themes, and plugins run it over every string they treat as a file name, including generated CSS caches and temp files. The plugin therefore rewrote names it had no business touching:

passed in returned before the fix
plugin_cache-layout-2728.css plugin-cache-layout-2728.css
style_dynamic_theme.css style-dynamic-theme.css
製品-カタログ.css css

Any code that writes a cache file under its real name and then reads it back through sanitize_file_name() (or the reverse) silently missed. On one reported site this surfaced as the theme's entire header — logo and main menu included — rendering nothing at all, with no PHP error to point at the cause.

The fix

Renaming now runs on wp_handle_upload_prefilter and wp_handle_sideload_prefilter, so only files that are genuinely being uploaded or sideloaded are touched. Nothing else changes:

  • The renaming rules are identical (accents transliterated, spaces and underscores to hyphens, non-ASCII stripped, lowercased)
  • The date prefix option behaves the same
  • Existing media files are still never renamed

Verified on a live WordPress install: sanitize_file_name() now passes cache-style and non-Latin names through untouched, while Café Menü 2024.jpg still becomes cafe-menu-2024.jpg on both the upload and sideload paths, and the date prefix still yields 2026-08-06-my-photo-01.png.

The same fix ships in Omni Webmaster & SEO Suite 2.4.1, which shares this module's logic.

Full Changelog: v1.2.1...v1.2.2

Release v1.2.1

Choose a tag to compare

@github-actions github-actions released this 04 Aug 08:09

Full Changelog: v1.2.0...v1.2.1

v1.2.0

Choose a tag to compare

@ivanusto ivanusto released this 19 Jul 06:53

v1.2.0: Convert file extensions to lowercase during sanitization to avoid path mismatches on case-sensitive hosting systems, enforce typed properties for PHP 7.4+ type safety, and add bilingual READMEs.

v1.1.0

Choose a tag to compare

@ivanusto ivanusto released this 18 Jul 17:04

Initial release of Smart File Renamer plugin. Automatically renames files with accents and special characters during upload for better SEO.