web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / botAvatarImage and use...
Copilot Studio
Unanswered

botAvatarImage and userAvatarImage is not working in PVA

(0) ShareShare
ReportReport
Posted on by

Hi,

 

Anyone facing issue with botAvatarImage and userAvatarImage?

I see the botAvatarImage and userAvatarImage are not working. I am referring to the doc provided by PVA. URL:https://powervirtualagents.microsoft.com/en-us/blog/change-your-power-virtual-agents-default-canvas-bot-icon-and-name/


I had also posted the issue earlier but no luck.

@BoLi Can you please help?

 

<!DOCTYPE html>
<html>
<head>
 <title>Contoso Sample Web Chat</title>
 <!-- This styling is for the Web Chat demonstration purposes. It is recommended that style is moved to separate file for organization in larger projects -->
 <style>
 html, body {
 height: 100%;
 }

 body {
 margin: 0;
 }

 h1 {
 font-size: 16px;
 font-family: Segoe UI;
 line-height: 20px;
 color: whitesmoke;
 display: table-cell;
 padding: 13px 0px 0px 20px;
 }

 #heading {
 background-color: black;
 height: 50px;
 }

 .main {
 margin: 18px;
 border-radius: 4px;
 }

 div[role="form"]{
 background-color: black;
 }

 #webchat {
 position: fixed;
 height: calc(100% - 50px);
 width: 100%;
 top: 50px;
 overflow: hidden;
 }

 </style>

</head>
<body>
 <div>
 <div id="heading">
 <!-- Change the h1 text to change the bot name -->
 <h1>Contoso Bot Name</h1>
 </div>
 <div id="webchat" role="main"></div>
 </div>

 <script src="https://cdn.botframework.com/botframework-webchat/latest/webchat.js"></script>

 <script>
 const styleOptions = {

 botAvatarImage: 'https://image.flaticon.com/icons/svg/3324/3324775.svg',
 userAvatarImage: 'https://image.flaticon.com/icons/svg/3324/3324784.svg'

 };

 // Add your BOT ID below
 var BOT_ID = "ABC";
 var theURL = "https://powerva.microsoft.com/api/botmanagement/v1/directline/directlinetoken?botId=" + BOT_ID;

 fetch(theURL)
 .then(response => response.json())
 .then(conversationInfo => {
 window.WebChat.renderWebChat(
 {
 directLine: window.WebChat.createDirectLine({
 token: conversationInfo.token,
 }),
 styleOptions
 },
 document.getElementById('webchat')
 );
 })
 .catch(err => console.error("An error occurred: " + err));

 </script>
 </body>
</html>

 

Categories:
I have the same question (0)
  • Verified answer
    CU22081450-0 Profile Picture
    Most Valuable Professional on at

    Hi @Anonymous ,

     

    Please, follow this topic: https://powerusers.microsoft.com/t5/General/Bot-Avatar-and-User-Avatar-images-not-working/m-p/669088#M1146

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 255 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 205 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 101 Moderator

Last 30 days Overall leaderboard