Using image overlay on an existing image from repository
Hi, ive been trying to make a dynamic welcome image over on discord using a discord bot, i wanted to overlay the user joining's pfp on one of my images from my media library which is https://res.cloudinary.com/yakimg/image/upload/v1623491949/welcome_zx38wl.png since we need a base64 encoded version, i gave up on that method since its not possible to convert the user avatar's link to base64 within the bot for me, ive been told to use the auto upload feature by using a link prefix. as such made a mapped folder called "remote_avatar" and set it to map https://cdn.discordapp.com/avatars/ which all discord avatar link contains, however i cannot get it to work. i tried using this link
https://res.cloudinary.com/yakimg/image/upload/remote_avatar/695307292815654963/73d4e4b2d83116c6c93aaae7a73e8142.webp?size=1024/v1623491949/welcome_zx38wl.png Not sure how to use this feature, the documentation showed how to auto upload one image but not how to overlay it on another one. If someone could help me a bit would appreciate it. Im still new to using cloudinary
Thanks in advance
-
Hi Yakio,
You should be able to use auto-uploaded assets in your account as overlays in the same way as when accessing the assets directly - the first request that we receive which requires a not-yet-existing image from the mapped folder will result in us making a request to the remote URL to retrieve the image.
The most likely reasons for a failure here will be if the mapping isn't set correctly in your account settings, or if our request to the remote URL did not receive an image in the response. The most likely reason for us not to receive a response is if the URL isn't correct or if some URL parameters need to be included on our request to the remote URL but those were not encoded in the Cloudinary URL (e.g. for this example, our request to discord would be for "https://cdn.discordapp.com/avatars/695307292815654963/73d4e4b2d83116c6c93aaae7a73e8142.webp" but if you need the other parameters sent to discord also, they need to be encoded.)
May I ask you to check that please? if it's still not working, you can create a request for our support team directly using the "Submit a request" link on this support site, and you can include details of your account and requests there so we can check your account settings and corresponding logs
Regards,
Stephen1 -
Thanks for the reply stephen, ill check out if that is the problem or not, and if i get stuck ill open a support ticket, thanks for the help
0
Post is closed for comments.
Comments
2 comments