I have an image whose filename is Chu Thái.jpg
. When uploading it to media library, the filename in hosting has been renamed to Chu-Thái.jpg
, but the path of the image doesn't the same as the filename: http://bem.vn/httq/wp-content/uploads/sites/2/2013/10/Chu-Thái.jpg
So that, when copy the url into the brower, it says the file was not found on this server.
The requested URL /wp-head/wp-content/uploads/sites/2/2013/10/Chu-Thái-150x150.jpg was not found on this server.
I wonder how the problem caused by Wordpress or by my hosting?
The problem is that you should not upload files with special characters in it. What I use in a plugin of mine is the filter
sanitize_file_name
.I ended up pulling and adapting 3 functions from this plugin, so as to do a full clean up of uploaded filenames, so as not to have this kind of error: