• Hi,

    I have just updated my site to WP 5.3.1 and I have noticed a small issue.

    In WP, whenever I upload an image file to a post WP adds “-1” to the end of the filename.

    Example:

    I upload “image.jpg” to a post in WP. When the file is uploaded, it automatically gets renamed to “image-1”.jpg

    How can I fix this problem? I would like to retain the original filename.

    Any help would be much appreciated!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator James Huff

    (@macmanx)

    It will do this if there’s already a file with the same name, to avoid any naming collisions.

    I am experiencing the same issue. Clean install with no uploads yet, so it’s not a conflict with an existing file of the same name.

    Thread Starter reactic

    (@reactic)

    James, that’s not the issue. There’s no file with the same name on the server.

    This issue occurs to any image file I upload.

    I’m still looking for a solution.

    Yogananda

    (@yogananda-puri)

    Hi,

    Have you found a solution, I am experiencing the same problem ?
    And no, it′s not because there already is a file with that name.

    Thanks,

    Yogananda

    (@yogananda-puri)

    And it’s not a plugin issue either – I have tried disabling all plugins.

    Yogananda

    (@yogananda-puri)

    Hi,

    I found a thread covering the issue, with a solution if anyone else is having the same problem.
    Apparently it′s not a bug per se, but a new add-on to the wordpress handling of images uploaded. Bad idea !!!

    https://core.trac.www.ads-software.com/ticket/48974

    Be well and happy !

    There is more: an instance of WP 5.4.2 on XAMPP/Windows will not add “-1” while the same WP 5.4.2 on the Linux production server will … go figure …

    Vicky

    (@vickymedrano)

    WordPress will also change the image filename upon upload if it ends with a numeric value such as 40×50 or so. Even if the filename has never been used before at all, WordPress will add a “-1” at the end. This is driving me crazy.
    Example: “bag-40×50.jpg” , will get named “bag-40×50-1.jpg”. So frustrating! Please fix it!!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘WP 5.3.1 issue: image filenames changed after upload’ is closed to new replies.