Profile Picture for Discord Webhook

I was wondering how to set a profile picture from a URL or ID for a discord webhook sent out by a script. Something like a certain image, nothing auto-generated. Thanks.

If this wasn’t very clear, I typed this out in a rush because I’m busy at the moment. Please ask if you need me to clarify anything :slightly_smiling_face:

The structure of a webhook takes the following values and one of them is a URL for the avatar image:


Just pass a valid image URL for avatar_url and you should be good to go.

Reference:

2 Likes

Would something like this work?
["avatar_url"] = "https://media.discordapp.net/attachments/[number]/[number]/x.png?width=401&height=401"

Not sure if you still have to pass this part width=401&height=401, but I guess that should work.

Ah ok. It worked, there was just a small error in my code. Thanks!