How to sync profile images between Webflow and Memberstack when Google login URLs exceed character limits?
hi all! I have an interesting bug that I'm hoping someone could rubber duck with me on. I have a membership directory in webflow. I have an integration set up that when a user updates their profile on the frontend my make scenario for watching updated memberstack records run to either create a new webflow cms item or update an existing one. I'm using the solution from this tutorial to ensure the profile url stays synced between webflow and memberstack. It works great unless the user creates their account with google login and the picture url for that exceeds the 256 character limit in webflow (i have the url as a plain text input on my webflow collection). as a band-aid i'm running logic to check the length of the of the url and setting the default placeholder image if it is too long, but this creates a weird UX where if the user then goes to edit their profile again they'll see their google image bc that's what is save to memberstack and i have the custom attribute set on that element in case they want to update the photo. but in the backend of webflow (and then on the membership directory page) the url is the default placeholder. Any thoughts on how I could "mask" the profile image in the edit profile page to properly show whats stored in webflow but still include the custom attribute for when they want to update their photo? hope this isn't too confusing 😅 TIA!
Comments
3 comments
Hey Katherine Tabinowski, I have come across similar issues with Gmail profile image 🫠and haven't found an easy enough solution within the workflow yet.
But for your use-case, the section where you have the "Edit profile" form where users can see and upload their profile image, you could remove the data-ms-member="profile-image" just from the image component and link it to the webflow cms image field (where you have the placeholder).Â
So I am visualizing it like this, user signs up via google, Memberstack saves their profile picture, we are not able to push it to Webflow CMS however so we have a placeholder. The user when sees their profile to edit some details, and the profile picture is linked to Webflow field so it shows up as placeholder (also in the member directory page), they then click the "Upload new" button which comes with the Memberstack profile image component and uploads a new one. This is saved in Memberstack now and also triggers your workflow in Make which will update the webflow image field to the new one.
This way, even though we have different images in the back-end, users on the front-end know that they have to upload a new profile picture and once they do, its all synced up. Hope this helps.
ok gotcha so bc my button as the data-ms-action="profile image" in the form to update the image it'll still update everything ok cool i will give that go thank you! glad it's already a known issue
hey AJ so i tried out the solution you offered but now it's a bit wonky in that the image element isn't asynchronously getting updated anymore since the element no longer has the profile-image attribute on it, but since the image saves to memberstack instantly the toast shows up saying the image has been updated but the UI obvi doesn't reflect that. Any other thoughts on how I could manage this? is there a way to hit the api to update the profile image directly? or is it possible to suppress the toast showing up after an image is uploaded?
Please sign in to leave a comment.