• quanvhm

    (@quanvhm)


    Hi there, currently, I am building a human resources management website using Ultimate Member. I also use the ‘Import and export users and customers’ plugin to import necessary fields and bring them into UM. Everything has been going smoothly, but there’s one annoying issue: I haven’t been able to import the profile pictures.

    • I am aware that each User_id should have a profile picture, but I haven’t figured out how to create a CSV file that can import images into the corresponding User_id.
    • Here is an example of my CSV file, and the profile-picture field in it contains the absolute link to the media library or a link to a folder on Google Drive (as shown in the example image)

    https://drive.google.com/drive/folders/1-sIAEqeId3KjiM87PDpr785dbk6A07D-?usp=sharing

Viewing 15 replies - 1 through 15 (of 16 total)
  • missveronica

    (@missveronicatv)

    @quanvhm

    Yes, it’s possible by doing some custom coding.

    Change your CSV file header from profile_photo to another meta_key.
    By using this meta_key as the Profile photo source address
    it’s possible to copy the image into UM.

    I will prepare a plugin for you to use,
    which will copy the image when displaying the User’s profile page
    and because of UM caching the Profile photo will be displayed
    after refreshing the page once.

    Thread Starter quanvhm

    (@quanvhm)

    It’s great that you have replied to my ticket. As you mentioned, you will create a custom plugin for me to support this, and I’m really happy about that. However, may I ask when I will receive the plugin? My website is very close to its deadline, and everything is almost complete, but the avatar feature is essential and still missing. I hope you can assist me as soon as possible. And I hope that when I receive the plugin, I will also get a documentation guide attached so that I can do it myself instead of having to ask you further.

    Thank you, and have a great day!

    • This reply was modified 4 weeks, 1 day ago by quanvhm.
    missveronica

    (@missveronicatv)

    @quanvhm

    The first version will be available today European time.
    I will post here in the Forum a link to GitHub with the plugin incl documentation.

    Thread Starter quanvhm

    (@quanvhm)

    Wow, that’s amazing! I’m really looking forward to this plugin. Thank you so much!

    missveronica

    (@missveronicatv)

    @quanvhm

    You can download and try the “Import Profile Photos” plugin now.

    https://github.com/MissVeronica/um-import-profile-photos

    Thread Starter quanvhm

    (@quanvhm)

    Wow, this is amazing! You have created an incredible add-on for me. After downloading and using it, I seem to have encountered a few issues as follows:

    1. The profile picture has been successfully imported into the profile_photo meta_key

    • The image class in the HTML has changed to "um-avatar um-avatar-uploaded", indicating that the plugin has recognized the image.
    • I checked the directory /wp-content/uploads/ultimatemember/{user_id}/, and the image is not in the folder with the absolute URL.

    2. However, the image does not display correctly on the frontend

    • When inspecting the <img> element, I noticed differences between users:
      • For users whose profile picture was imported via CSV with the meta_key "profile_photo":<img class="gravatar avatar avatar-190 um-avatar um-avatar-uploaded" src="?1739328019"> → The image path is missing, leaving only the query string. https://prnt.sc/lqLhGLYR1nQp
      • For users whose profile picture was imported via CSV with the meta_key "profile_photo_test":<img src="https://hr.macusaone.com/wp-content/plugins/ultimate-member/assets/img/default_avatar.jpg" class="gravatar avatar avatar-190 um-avatar um-avatar-default"> → The system does not recognize the image and instead displays the default avatar. https://prnt.sc/DyqoeWWkCOan
      • For users who uploaded their profile picture manually:<img class="gravatar avatar avatar-190 um-avatar um-avatar-uploaded" src="https://hr.macusaone.com/wp-content/uploads/ultimatemember/18/profile_photo-190x190.jpg?1739328019"> → The image is displayed correctly with the full path. https://prnt.sc/2KMS5I6AP-90
      • https://prnt.sc/DDqrtPFoL4Xh – OVERVIEW

    3. When accessing the Edit Profile page

    • For users whose profile picture was imported via CSV with "profile_photo"
      • The Edit and Delete image options are available, but the image is not displayed.
      • This suggests that the system has detected an image, but it is not rendering correctly. → Abnormal behavior.
    • For users whose profile picture was imported via CSV with "profile_photo_test"
      • The option Upload photo is available, and no image is displayed, behaving as expected. → Normal behavior.
    • For users who uploaded their profile picture manually
      • The Edit and Delete image options are available, and the image is displayed correctly. → Normal behavior.
    • https://prnt.sc/oZ__O86SeC6T – OVERVIEW

    4. What I have tried but have not resolved the issue

    • Cleared browser cache & WordPress cache, but the image still does not display correctly.
    • Checked the image directory on the server, confirmed that the image exists, but the plugin does not automatically recognize the image path.
    • Checking the database (wp_usermeta), I didn’t find any data related to the image, which makes me wonder how the plugin stores the image information.

    5. My questions

    1. Does the plugin support automatically generating the image URL after importing from CSV?
    2. How can I force Ultimate Member to recognize the image and generate the correct image path?
    3. Is there an action/hook that needs to be triggered to enable the image display after import?
    4. Why does the system detect the image in Edit Profile but fail to render it?
    5. How does the plugin store image information in the database, and why can’t I find any related data in the wp_usermeta table?

    I would greatly appreciate any guidance on resolving this issue. Thank you for your support!



    • This reply was modified 4 weeks ago by quanvhm.
    • This reply was modified 4 weeks ago by quanvhm.
    • This reply was modified 4 weeks ago by quanvhm.
    missveronica

    (@missveronicatv)

    @quanvhm

    imported via CSV with the meta_key “profile_photo”:

    This is not supported because you load the source address from CSV into the UM profile photo meta_key.

    imported via CSV with “profile_photo_test”

    is the right usage of the plugin.

    Yes, the UM default avatar is used by UM for the page while the plugin is loading from source and the new profile photo is used by UM after a profile page refresh or a second page load.

    When the new Profile photo is ready to be used by UM the UM cache for this User is cleared by the plugin and requires a second display of the page to show the imported photo now as an UM loaded profile photo.

    Your questions:

    1,2,3. Not required, UM is creating all at page creation.
    4. I can’t see any issues with editing. Don’t use plugin setting – Reuse Meta_key.
    5. The only info you can see in usermeta table is the meta_key profile_photo with the file name ie profile_photo with right extension.

    missveronica

    (@missveronicatv)

    @quanvhm

    You can download and try the “Import Profile Photos” plugin version 1.1.0 now.
    There are some new options you can read about in the documentation
    and there is another earlier UM hook being used for the photo updates.

    https://github.com/MissVeronica/um-import-profile-photos

    Thread Starter quanvhm

    (@quanvhm)

    Hmm, I’m not sure where I went wrong. However, here’s what I have done, which follows the instructions from your documentation, but it still doesn’t seem to be working.

    In the UM settings, I have set it up as follows: https://prnt.sc/qR4oDbDu7TPq

    In the CSV file, I have included the necessary fields and data as follows: https://prnt.sc/wZLfGnnegHQS

    I have also cleared the cache and refreshed the website multiple times, but the images still do not appear.

    Would you be able to take some time to review this and help me resolve the issue?

    I really appreciate your support!

    • This reply was modified 3 weeks, 6 days ago by quanvhm.
    missveronica

    (@missveronicatv)

    @quanvhm

    The valid URL is wrong.

    https://another.domain.com/wp-content/uploads/
    is sufficient for downloading from another domain address
    than the domain where you have home WP installed.

    In the CSV file use the Profile photo URL from another domain:
    https://another.domain.com/wp-content/uploads/2025/01/123456789-2.jpg
    which will read and update UM with this profile photo

    For the WP home domain profile photo use in the CSV file the WP path like:
    /wp-content/uploads/2025/01/123456789-3.jpg
    which will copy from current WP to UM the profile photo.

    Settings are OK and with “Reuse Meta_key” the User Profile photo update by UM is disabled and any Profile photo updates must be made at the WP home or Remote Media library.

    Thread Starter quanvhm

    (@quanvhm)

    It seems like you didn’t quite understand what I meant.

    1. The images are already in the Media Library of my WordPress admin, and I took the URLs from there to include in the CSV file.
    2. The example I provided in my previous reply was just a placeholder (e.g., https://my.domain.com/….. is an example domain, not my actual website). If needed, I can privately share the real domain with you in a more secure way rather than posting it here.
    3. My goal is to bulk upload employees using a CSV file, and I already have all the employee images stored in the Media Library.→ If CSV is not working, is there any other way to bulk import users into Ultimate Member using your add-on?
    missveronica

    (@missveronicatv)

    @quanvhm

    Use URL only for importing photos from another domain.
    Use the /wp-content/uploads/2025/01/123456789-3.jpg for import from current WP.

    Don’t use “Reuse Meta_key” if you want Users to edit the Profile photo in UM.

    Profile photos are imported one-by-one when you display a User profile.
    There is no bulk import of photos.

    missveronica

    (@missveronicatv)

    @quanvhm

    There is an update available plugin version 1.2.0
    required for UM 2.10.0 being released Monday February 17.

    https://github.com/MissVeronica/um-import-profile-photos

    Thread Starter quanvhm

    (@quanvhm)

    Wait, we need to clarify the issue:

    1. I’m using an image from the Media Library and have also tried using this URL: /wp-content/uploads/2025/01/123456789-3.jpg, but it’s still not working.
    2. Does this add-on allow me to bulk upload users along with their avatars? I don’t have time to do it for each user individually since there are quite a lot of them.
    3. I’ve unchecked the “Reuse Meta_key” option so that users can’t edit their avatars anymore.
    4. And why is version 1.2.0 still not working?
    missveronica

    (@missveronicatv)

    @quanvhm

    1. This path should work, plugin is adding the site’s absolute path.

    2. No bulk upload. When user is logging in the Profile photo of the User is imported. There is no need to access Users in advance.

    3.This will allow Users to edit their Profile photos.

    4. Verify that you don’t have anything saved in the profile_photo meta_key for the Users.

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