phpwordpresswebultimate-member

How to automatically rename file name to username value for uploaded user images in WordPress - ultimate memeber plugin


When using the Ultimate Member plugin on WordPress, I encountered one difficult problem for me. I need the uploaded user image in his profile to turn into a link like: http://example.com/img/%username%.png The path to %username%.png is not important (the main thing is that it does not change), but I wanted so that the user's uploaded image has a name that matches the username value. Tell me how this can be implemented, I’m new to PHP and know everything very superficially.

At the moment the link looks like: https://example.com/um-download/6287/img/6/93059f79c9?t=1694944149 The only thing I could cling to is that the letter 6 is the user id.


Solution

  • The solution to my problem was literally the only shareware file-renaming-on-upload plan with such a functionality. In it, you can automate the renaming of files depending on {port} {username} {date} and so on. https://wordpress.org/plugins/file-renaming-on-upload/