• Hi Team, Is there any option to randomized the name of the uploaded profile pic like below.
    avatar15022478484.jpeg

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Faisal Alvi

    (@faisal03)

    Hi @ugene,

    The plugin already randomizes part of the uploaded profile picture’s name by appending a timestamp.

    sanitize_file_name( $user->display_name . '_avatar_' . time() );

    If you’re experiencing a different behavior, could you share more details about your use case? Understanding your exact requirement will help us assist you better.

    Thread Starter ugene

    (@ugene)

    Hi @faisal03 ,
    Thank you for replying.
    I mean when somebody uploads a profile pic. Lets say – Tom.jpg.
    What i want is instead of Tom.jpg rather I would like to have avatar04364876.jpg (as i dont want somone to just predict the image file)

    I see the sanitize_file_name function called in unique_filename_callback()
    I tried to re upload the same image again, it just adds tom-1.jpg which should be wordpress default.
    To explain here is my video: https://www.awesomescreenshot.com/video/37620708?key=ada4fbff391603ee5aaeddf863b99f5c

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.