Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Images are being slugified with file extension added to file name #1509
Uploading an image that is already slugified shouldn't change anything about the filename.
The file extension is being added to the end of the name. Underscores are also converting to dashes.
Steps to reproduce
Operating System: MacOS 10.12.5
Web Server: Apache
PHP Version: 18.104.22.168 (prod) and 7.0.8 (locally)
Statamic Version: 2.6
Updated from an older Statamic or fresh install: updated
I can confirm this is happening too (macOS with Valet).
For us, this stops us updating our clients to 2.6 as, even if they upload sensible filenames, it appends the extension to the name and we don't want them to end up with a bunch of those in their assets.
Is there a fix we could put in place before 2.6.1 so we can get 2.6 rolled out?
I also support not converting underscores to dashes.
@jasonvarga the file name changed, the underscore that had been in the filename prior to upgrade got changed to a dash, but the reference to it in the page content referred to the old filename (i wouldn't expect that part to automatically update, i just also wouldn't expect existing image filenames to change)
Chatted with Becky in Slack.
Issue there is that there was a file uploaded in 2.5 that was unaffected by the slugified changes.
In 2.6.1, the filename will not add the extension, and will leave underscores intact.
@lukeagsmith Here's the patch: