Embed image doesn't show since couple of days.
I am not sure if it is discord.js problem.
My bot once a day posts 3 embeds with images.
In 2 of 3 embeds images are displayed correctly, in last embed image is not displayed at all since 5 days.
I checked embed source, image url and proxy_url are set correctly, however image width and height is 0.
When i open that image url (from not working embed) in the browser it clearly shows image is 560 x 400 px. When i open image from working embed it shows the same thing.
Even weirder is that, if i request exactly the same embed with slash command, it displays image correctly, problem exists only with automated posts with cron.
discord.js - 14.16.3
node.js - 20.16.0
OS - Ubuntu 20.04
Is there any way i can force width and height of that image inside embed?
2 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by OPi checked it twice,
console.log(JSON.stringify(sentMessage.embeds))
right after bot sent that message,
and also fetched message by id, both are identical:
(paths are different than in original post because i tested if that's cache issue, but nothing changed)
when i request that embed with slash command, width and height are set correctly.
Part of the code to create embed is shared with cron and slash command,
Other embeds that works fine are structured the same way.
Maybe something is wrong with that images, but it was working fine for over 3 years.
That's odd because images in embeds that always works are from the same GitHub repository just a different folder
That images has a few kilobytes
I am well below the limit of 2GB / month
I have CDN and i will try it
But i send that in 3 separated messages.
Each message is independent because wait for the script that fetch data from the game API
Usually there is 15 seconds time difference between that messages
And that not working embed is usually first
yes, the thumbnail always shows up, but is also much smaller
I will try with CDN
That's not issue with content delivery time. Images from Google CDN also doesn't work.
When i use AttachmentBuilder to attach image directly to the embed, is exactly the same problem.
Embed source gives correct working url and proxy_url, but width and height is 0