Avatar not showing in notification center when triggering in-app messages
Hi everyone,
The subscriber's avatar is not showing in the notification center, even after creating a subscriber with the user's image and also passing it when triggering the notification.
24 Replies
Hi @David 😎, I'm an AI assistant for Novu. While a team member reviews this question, I'll see if I can find relevant sources for your question.
-----------------------------
While I generate an answer, here are some sources that might be helpful:
* Introduction to Notification Center
* Vue
* RedwoodJS
* How to use Headless Notification Center
-----------------------------
Answer
To address the issue of the subscriber's avatar not appearing in the notification center when triggering in-app messages, it's important to ensure that the avatar URL is correctly included in the payload when triggering the notification.
According to the Novu documentation, you should include the
avatar
parameter within the payload when triggering a notification using the backend SDK methods (1) . Here is an example code snippet for triggering a notification with the avatar included:
Ensure that the avatar
URL is publicly accessible and correctly formatted. If the issue persists, it might be worthwhile to check the console for any errors or warnings that might indicate what is going wrong.Got it. Tagging @Support for additional help.
It's not still working, here is my image URL: https://lh3.googleusercontent.com/a/ACg8ocI_vJjIPVVwyKYladEfOpzRVz0-4CKrEjwcU1iur6onyEmzFjU=s96-c
My Novu trigger:
A snapshot of the workflow
@David 😎
here avatar will be of actor not of subscriber (to which notification is triggered)
Okay, so how do I pass it?
As a payload with an attribute name of "actor"?
I need to send the unique image URL during every trigger
let's suppose there are two subscribers
and you selected this option 👇🏻
once you trigger the workflow to subscriberId_1, you need to send the actor also
novu will use
subscriberId_2
avatar url https://image.com/AVATAR_URL_subscriber_2
oh! Okay, let me try it now.
in this field you can save absolute url of image. here variables are not supported as of now.
third option is to use system icons
let me know if you face any issue
@Pawan Jain it's still the same only the default image is showing:
@David 😎
Fun fact is we don't have default image as Novu icon.
Default image is avatar icon in third notification
this novu icon is either coming from actor avatar url or you have entered this image url in avatar url field
I actually, entered the URL into the field as a default:
Should I remove it and leave it empty.
Yes you should remove it
Wow! It's now working.
Thanks! I guess the important part is that
actor
property when sending avatars.Glad it worked
Let me know If I can help with anything else 🙂
Will do! working on another project using Novu also - hopefully I don't encounter issues. 😁
If possible, the documentation can also be updated to show this instruction.
Yes. I am on it
@David 😎
This information is now available on docs
https://docs.novu.co/notification-center/client/react/get-started#avatar-icons
Novu
React Get Started - Novu
Learn how to add novu powered In-App notification center to your React app
Awesome, I've another issue with headless Novu.
Let me create a new post