Avatar file name should not be based on display name but on username.
If the display name contains german umlauts like äöü or other “weird” utf-8 chars, it will end up as a filename like “TÃ¼rk_avatar.jpg” if the display name is “Türk”.
Note that the currently used
sanitize_file_name()does not handle these cases, maybe give
sanitize_title()a try if you can’t use the username.
Filenames like the above cause many problems when being backed up / restored by a plugin or if the wordpress site is copied to a different operating system or server, like linux to windows or similar.
Workaround for current version 1.3.1:
1. Select the username as display name in user profile (and check delete avatar checkbox if an avatar was saved before)
2. Update user profile
3. Select the avatar file
4. Update user profile
5. Switch back to your desired display name
6. Update user profile
Then the avatar file name will be based on username.
- The topic ‘Avatar file name should not be based on display name’ is closed to new replies.