• When a file is uploaded from media uploader, I noticced that WP often adds “_” in the filename (in URL).
    I haven’t figured out what the rule is, but for example, “xxxxx.aaa.jpg” becomes “xxxxx.aaa_.jpg”.
    Why this happens and is it possible to fix this?
    Thanks in advance!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The underscore is used to replace spaces in the filename. If you don’t upload filenames with spaces in theme, it won’t happen.

    Thread Starter john

    (@azunyann)

    Thanks for the info, but the original filename doesn’t have any space.

    This problem is easy to reproduce. Just upload a file with filename “xxxxx.aaa.jpg” and you can see what happens.

    Try uploading xxxxx-aaa.jpg instead. Again uploaded filenames shouldn’t have any periods in them except for their file extension

    Thread Starter john

    (@azunyann)

    So, using multiple periods in filenames causes the problem?
    BTW, the problem doesn’t occur when the filename is “xxxxx.a.jpg”. Maybe I’m going to read WP source codes to see what it is doing.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Filename is modified when uploaded…why?’ is closed to new replies.