Open LordTylus opened 8 months ago
Additional information:
Sometimes just posting an Image Link also doesnt seem to be rendered:
Posted it twice, the first one was not rendered, all subsequent ones were without problem.
Additional Information:
Uploading the Image and referencing it in the Embed works fine every time. So the problem seems to be related to external links. I really don't want to upload a bunch of files to discord when it is not needed, since everything is already online on the respective website.
@LordTylus are you able to reproduce this with all external hosted images or just ones hosted on www.twinsdragonscomic.com?
@sklein12 certainly not on all.
I can consistently reproduce it with twindragonscomic.com and savestatecomic.com
Both seem to run on WordPress. The owners are independent and they have independent servers as well.
I tested it with image links that point to Tumblr's cdn and those work just fine. And image links pointing to DeviantArt also seem to work without issue.
These WordPress pages aren't the quickest to respond. And if they work it takes a few good seconds till the image appears in the embed. While the links to Tumblr or DeviantArt appear near instantly.
Could there be a timeout involved?
I have seen images. Not loading occasionally in the past. Maybe once a month. So I never gsve it mich thought. That it is this bad only happens for about a week.
When I upload the images as file attachments to discord and reference the attachment in the embed it works fine too. So I am starting to believe that it might be related to WordPress. But sadly I don't have any way of analyzing what's happening.
A quick scan of the code indicates that we'd timeout after 5 seconds. In my playing around right now, the images load pretty instantly and are unfurling very consistently. Its possible that when this site is under load it fails to respond within 5 seconds and we give up
This is rather odd.
When it works I never had to wait 5 seconds. It took a like maybe 1 to 2 seconds. When I download the picture first via OkHttpClient and upload it, its also always like 1 second. (Gut feeling I never measured it)
Opening an image in browser without cache also seems to be rather quick. I can run additional tests tonight, where I take more exact time measurements. And not just gut feeling.
Plan is I download a picture via OkHttpClient 20 times to see what the min avg and max load times are. And I Link to it via discord embed and see how many of those fail. Alternatively I load ans post 20 different pictures.
I mean of course there are other things that could ve at play here. Latency potentially depending on where the servers are physically located and where its being connected from.
Hello there again,
sorry for the long wait. But I have conducted a few more tests: First I attempted to send the same picture 20 Times with little to no delay in between. The result was, that out of the 20 times. 5 were successful 15 failed.
Running the test again resulted in 20 pictures not being displayed. Probably some spam detection going on? Not sure...
Then I added some delay of 2 seconds between sending an embed with the same picture. Those were 20 successful ones.
And then I grabbed 20 random Image URLs from my archive measured the times and output:
try {
List<String> urls = List.of(
"https://www.twindragonscomic.com/wp-content/uploads/2019/11/Twin_Dragons_221.png",
"https://www.twindragonscomic.com/wp-content/uploads/2019/06/Twin_Dragons_201.png",
"https://www.twindragonscomic.com/wp-content/uploads/2022/11/Twin_Dragons_368.png",
"https://www.twindragonscomic.com/wp-content/uploads/2016/04/Twin_Dragons_035.png",
"https://www.twindragonscomic.com/wp-content/uploads/2023/10/Twin_Dragons_419.png",
"https://www.twindragonscomic.com/wp-content/uploads/2020/09/Twin_Dragons_267.png",
"https://www.twindragonscomic.com/wp-content/uploads/2016/04/Twin_Dragons_036.png",
"https://www.twindragonscomic.com/wp-content/uploads/2020/04/Twin_Dragons_245.png",
"https://www.twindragonscomic.com/wp-content/uploads/2017/09/Twin_Dragons_108.png",
"https://www.twindragonscomic.com/wp-content/uploads/2022/09/Twin_Dragons_362.png",
"https://www.twindragonscomic.com/wp-content/uploads/2018/12/Twin_Dragons_174.png",
"https://www.twindragonscomic.com/wp-content/uploads/2020/06/Twin_Dragons_253.png",
"https://www.twindragonscomic.com/wp-content/uploads/2018/01/Twin_Dragons_123.png",
"https://www.twindragonscomic.com/wp-content/uploads/2024/03/Twin_Dragons_437.png",
"https://www.twindragonscomic.com/wp-content/uploads/2016/01/Twin_Dragons_022.png",
"https://www.twindragonscomic.com/wp-content/uploads/2022/09/Twin_Dragons_359.png",
"https://www.twindragonscomic.com/wp-content/uploads/2017/12/Twin_Dragons_121.png",
"https://www.twindragonscomic.com/wp-content/uploads/2023/03/Twin_Dragons_388.png",
"https://www.twindragonscomic.com/wp-content/uploads/2018/09/Twin_Dragons_160.png",
"https://www.twindragonscomic.com/wp-content/uploads/2016/10/Twin_Dragons_061.png"
);
OkHttpClient okHttpClient = new OkHttpClient();
int i = 0;
for (String url : urls) {
Thread.sleep(2000);
long start = System.currentTimeMillis();
Request request = new Builder().url(url).build();
try (Response response = okHttpClient.newCall(request).execute()) {
ResponseBody body = response.body();
if (body != null)
log.info("{} - loaded {} bytes in {} ms", i, body.bytes().length, System.currentTimeMillis() - start);
}
TextChannel textChannelById = guild.getTextChannelById(1082027410683338852L);
MessageEmbed embed = new EmbedBuilder()
.setTitle(i + " Title")
.setAuthor("Me")
.setImage(url)
.setDescription("This is a Test")
.build();
textChannelById.sendMessageEmbeds(embed).queue();
i++;
}
} catch (IOException e) {
log.error("Error", e);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
The following Result was output:
17:29:50,522 [INFO ] [JDA MainWS-ReadThread] [DebugModule] 0 - loaded 617369 bytes in 1364 ms
17:29:53,236 [INFO ] [JDA MainWS-ReadThread] [DebugModule] 1 - loaded 670099 bytes in 702 ms
17:29:55,944 [INFO ] [JDA MainWS-ReadThread] [DebugModule] 2 - loaded 698810 bytes in 705 ms
17:29:58,635 [INFO ] [JDA MainWS-ReadThread] [DebugModule] 3 - loaded 585526 bytes in 688 ms
17:30:01,348 [INFO ] [JDA MainWS-ReadThread] [DebugModule] 4 - loaded 662221 bytes in 701 ms
17:30:04,042 [INFO ] [JDA MainWS-ReadThread] [DebugModule] 5 - loaded 608909 bytes in 692 ms
17:30:06,722 [INFO ] [JDA MainWS-ReadThread] [DebugModule] 6 - loaded 499930 bytes in 676 ms
17:30:09,408 [INFO ] [JDA MainWS-ReadThread] [DebugModule] 7 - loaded 505202 bytes in 683 ms
17:30:12,101 [INFO ] [JDA MainWS-ReadThread] [DebugModule] 8 - loaded 549066 bytes in 687 ms
17:30:14,820 [INFO ] [JDA MainWS-ReadThread] [DebugModule] 9 - loaded 684347 bytes in 707 ms
17:30:17,521 [INFO ] [JDA MainWS-ReadThread] [DebugModule] 10 - loaded 639092 bytes in 700 ms
17:30:20,204 [INFO ] [JDA MainWS-ReadThread] [DebugModule] 11 - loaded 527214 bytes in 682 ms
17:30:23,115 [INFO ] [JDA MainWS-ReadThread] [DebugModule] 12 - loaded 550961 bytes in 907 ms
17:30:25,826 [INFO ] [JDA MainWS-ReadThread] [DebugModule] 13 - loaded 644565 bytes in 698 ms
17:30:28,500 [INFO ] [JDA MainWS-ReadThread] [DebugModule] 14 - loaded 475130 bytes in 673 ms
17:30:31,192 [INFO ] [JDA MainWS-ReadThread] [DebugModule] 15 - loaded 576589 bytes in 690 ms
17:30:33,891 [INFO ] [JDA MainWS-ReadThread] [DebugModule] 16 - loaded 617201 bytes in 695 ms
17:30:36,584 [INFO ] [JDA MainWS-ReadThread] [DebugModule] 17 - loaded 560529 bytes in 691 ms
17:30:39,278 [INFO ] [JDA MainWS-ReadThread] [DebugModule] 18 - loaded 598631 bytes in 692 ms
17:30:41,961 [INFO ] [JDA MainWS-ReadThread] [DebugModule] 19 - loaded 498583 bytes in 678 ms
As you can see every image was loaded by my OkHttpClient within ~700ms
However there were a few images that were not loaded: (ignore the 0 Title... I forgot to advance i in my loop -.-
But I could see that the following URLs were not displayed correctly.
"https://www.twindragonscomic.com/wp-content/uploads/2022/11/Twin_Dragons_368.png",
"https://www.twindragonscomic.com/wp-content/uploads/2020/09/Twin_Dragons_267.png",
"https://www.twindragonscomic.com/wp-content/uploads/2016/04/Twin_Dragons_036.png",
"https://www.twindragonscomic.com/wp-content/uploads/2018/12/Twin_Dragons_174.png",
I then ran the test again.
This time, some of the previous images were displayed correctly. Others, however, were no longer:
"https://www.twindragonscomic.com/wp-content/uploads/2022/11/Twin_Dragons_368.png",
"https://www.twindragonscomic.com/wp-content/uploads/2016/04/Twin_Dragons_036.png",
"https://www.twindragonscomic.com/wp-content/uploads/2018/12/Twin_Dragons_174.png",
these failed to load.
I kind of dont believe its a timeout issue, since the server seems to respond to my requests just fine in an acceptable amount of time. Loading the preview however seems to randomly not work.
I hope this helps narrowing the issue down.
This is incredibly helpful, thank you. We will continue to investigate on our side
This time, some of the previous images were displayed correctly. Others, however, were no longer:
It sounds like you're saying here that some that previously loaded were no longer loading, but the list of images that didn't load
"https://www.twindragonscomic.com/wp-content/uploads/2022/11/Twin_Dragons_368.png",
"https://www.twindragonscomic.com/wp-content/uploads/2016/04/Twin_Dragons_036.png",
"https://www.twindragonscomic.com/wp-content/uploads/2018/12/Twin_Dragons_174.png",
seems to be a subset of the first set of images that didn't load.
Just want to confirm that there are no images that loaded in the first test of 20 different images that didn't in the 2nd test
I double checked it just now. You are right I thought it loaded one less, but apparently it didn't.
However, I just ran this test again. And you are right, it could still load all previous images and 1 extra. So now only
"https://www.twindragonscomic.com/wp-content/uploads/2016/04/Twin_Dragons_036.png",
"https://www.twindragonscomic.com/wp-content/uploads/2018/12/Twin_Dragons_174.png",
it couldn't load.
I guess Ill have to use a different random set next, if there actually is some caching involved I could imagine after testing a few more times it will have all of them.
Ya so we cache successes for a day and we cache failures for 5 minutes. So that explains both why you never see things that used to succeed start to fail, and why testing a single image 20 times with no delay after it failed once failed all 20 of them.
As for why its failing to begin with.. unclear still. Our tracing shows that we are indeed timing out when trying to fetch the images, but its not clear why yet.
I believe I'm experiencing the same or similar bug, though I've found something interesting - in my case most images do load properly for a split second, but then have their width
and height
set to 0 by a Message Update
event.
https://github.com/discord/discord-api-docs/assets/9750071/ebce24e2-b856-49e3-9a59-1240dc796f22
Similarly to the OP, all further attempts to embed the particular urls work fine, only the initial attempt fails.
I'm serving the images from my own express server, and I'm pretty certain that it isn't timing out. I've added some logging to the incoming requests when this issue occurs and got the following output:
2024-03-15T00:33:07: 1 Request from ip: 35.237.4.214 UA: Mozilla/5.0 (compatible; Discordbot/2.0; +https://discordapp.com) to path: /37feabb9c24b1b33ad640fc9fdcfc2d8.png
2024-03-15T00:33:07: Fulfilled request 1 after 0.06 seconds
2024-03-15T00:33:07: 2 Request from ip: 34.74.48.54 UA: Mozilla/5.0 (Macintosh; Intel Mac OS X 11.6; rv:92.0) Gecko/20100101 Firefox/92.0 to path: /37feabb9c24b1b33ad640fc9fdcfc2d8.png
2024-03-15T00:33:07: Fulfilled request 2 after 0 seconds
2024-03-15T00:33:07: 3 Request from ip: 34.23.59.147 UA: Mozilla/5.0 (Macintosh; Intel Mac OS X 11.6; rv:92.0) Gecko/20100101 Firefox/92.0 to path: /37feabb9c24b1b33ad640fc9fdcfc2d8.png
2024-03-15T00:33:07: Fulfilled request 3 after 0 seconds
2024-03-15T00:33:08: 4 Request from ip: 34.74.48.54 UA: Mozilla/5.0 (Macintosh; Intel Mac OS X 11.6; rv:92.0) Gecko/20100101 Firefox/92.0 to path: /37feabb9c24b1b33ad640fc9fdcfc2d8.png
2024-03-15T00:33:08: Fulfilled request 4 after 0.02 seconds
2024-03-15T00:33:08: 5 Request from ip: 35.237.99.52 UA: Mozilla/5.0 (Macintosh; Intel Mac OS X 11.6; rv:92.0) Gecko/20100101 Firefox/92.0 to path: /37feabb9c24b1b33ad640fc9fdcfc2d8.png
2024-03-15T00:33:08: Fulfilled request 5 after 0 seconds
2024-03-15T00:33:08: 6 Request from ip: 35.237.129.219 UA: Mozilla/5.0 (Macintosh; Intel Mac OS X 11.6; rv:92.0) Gecko/20100101 Firefox/92.0 to path: /37feabb9c24b1b33ad640fc9fdcfc2d8.png
2024-03-15T00:33:08: Fulfilled request 6 after 0 seconds
2024-03-15T00:33:08: 7 Request from ip: 34.23.59.147 UA: Mozilla/5.0 (Macintosh; Intel Mac OS X 11.6; rv:92.0) Gecko/20100101 Firefox/92.0 to path: /37feabb9c24b1b33ad640fc9fdcfc2d8.png
2024-03-15T00:33:08: Fulfilled request 7 after 0 seconds
2024-03-15T00:33:09: 8 Request from ip: 34.74.42.166 UA: Mozilla/5.0 (Macintosh; Intel Mac OS X 11.6; rv:92.0) Gecko/20100101 Firefox/92.0 to path: /37feabb9c24b1b33ad640fc9fdcfc2d8.png
2024-03-15T00:33:09: Fulfilled request 8 after 0 seconds
2024-03-15T00:33:10: 9 Request from ip: 34.23.59.147 UA: Mozilla/5.0 (Macintosh; Intel Mac OS X 11.6; rv:92.0) Gecko/20100101 Firefox/92.0 to path: /37feabb9c24b1b33ad640fc9fdcfc2d8.png
2024-03-15T00:33:10: Fulfilled request 9 after 0.02 seconds
2024-03-15T00:33:12: 10 Request from ip: 34.23.59.147 UA: Mozilla/5.0 (Macintosh; Intel Mac OS X 11.6; rv:92.0) Gecko/20100101 Firefox/92.0 to path: /37feabb9c24b1b33ad640fc9fdcfc2d8.png
2024-03-15T00:33:12: Fulfilled request 10 after 0 seconds
(I did the testing in my own private guild so there was only one client attempting to load the images).
I wanted to chime in and say I'm having the same issue with images not appearing in embeds, albeit with discord.js, and I'm serving them from my AWS S3 bucket. Historically they don't appear on occasion and attempting the same request a second time works, but it's been pretty reliably failing no matter the number of retry attempts in the past 24 hours. Pasting the image URL by itself causes the image to appear just fine
I am having the same issue even with images served with cloudflare like: https://s4.anilist.co/file/anilistcdn/character/large/b138850-eqwZ11Q6sLrl.png
I noticed that discord sends ~5 requests for the same image with no delay between requests, this started happening around the time images started to break about ~2 weeks ago.
first request from "user-agent": "Mozilla/5.0 (compatible; Discordbot/2.0; +https://discordapp.com)",
and the others from "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 11.6; rv:92.0) Gecko/20100101 Firefox/92.0",
Thanks for continuing to provide info everyone. We had to take a break from investigating this but it is still on our radar, and we should resume investigation shortly
Hi @ker0olos @cjm333 and @LordTylus . Joining this thread to help solve the issue. I've been performing some tests since last Friday based on the information provided here, using same hosts and/or images, but I couldn't reproduce the issue on my side.
We've made some changes to media last week, so I want to confirm with you first if the issue is still occurring as of today/last Friday?
If it is, I need to be able to either reproduce the issue or at least get a "fresh" trace from one of your failed requests so that I can troubleshoot.
Can you provide the following details:
Thanks!
Hello @remiolivier-discord,
thank you for the update. I just tried out my reproducer I posted above again. And all 20 of 20 images have been posted correctly.
I will test out different URLs later, when I have a little more time. But so far it seems to be working fine.
Hello @remiolivier-discord,
I'm facing a similar issue when using a bot to create embeds on a server (the thumbnail image, nor image fields, have their images loading). The URLs also don't load when posted to a channel standalone.
The details you'd requested -
https://wavu.wiki/t/Special:Redirect/file/Reina-1,1,2.jpg
https://wavu.wiki/w/images/4/49/Reina-1%2C1%2C2.jpg
https://wavu.wiki/android-chrome-192x192.png
https://wavu.wiki/w/images/c/cb/AsukaT8.png
This doesn't happen with all images. For example, https://cdn.discordapp.com/embed/avatars/0.png
works fine (image preview when link is posted in a channel, or when link is used as an embed).
I'd be happy to provide whatever additional info you would find helpful in resolving this issue.
Hi! This looks like a different issue, but for this one, wavu.wiki
is blocking our discord service to retrieve images and returns a 403, therefore we can't display the image
Hello again @remiolivier-discord,
I am terribly sorry for the long delay, but today I finally got to performing a thorough test. I have used my bot to post 100 different embeds and all 100 worked flawlessly.
So, I will now change my bots back to embed URLs instead of uploading them to discord whenever needed.
I don't know about all the others that have posted here, but as far as I am concerned, my Issue has been resolved.
Hello again @remiolivier-discord,
I am terribly sorry for the long delay, but today I finally got to performing a thorough test. I have used my bot to post 100 different embeds and all 100 worked flawlessly.
So, I will now change my bots back to embed URLs instead of uploading them to discord whenever needed.
I don't know about all the others that have posted here, but as far as I am concerned, my Issue has been resolved.
Great news! Happy it is working normally!
Hi! This looks like a different issue, but for this one,
wavu.wiki
is blocking our discord service to retrieve images and returns a 403, therefore we can't display the image
Thank you for checking @remiolivier-discord. I'll try to investigate and report back if we are unable to find an issue on our end.
Update: The issue was related to certain firewall rules on our end which were blocking the Discord service. We've fixed them, and everything seems to be in order. Thanks again!
Having same issue with Kord (Kotlin Bot Library) Images are not loaded by discord neither when in embed nor as message in chat. Proxy URL gives "ERR_INVALID_RESPONSE"
U.P.D.
The way to get around it is to manually download that image you are trying to use in embed, upload it as attachment to your message and use attachment://your_image.png
as embed image url
Hello, I recently encountered this issue as well.
My application is a bot that periodically posts messages, sending embeds with external image URLs to different server channels simultaneously using @discordjs/rest
.
Below is the embeds portion from the message data I retrieved using GET /channels/{channel.id}/messages/{message.id}
{
"embeds": [
{
"type": "rich",
"url": "https://tw.toram.jp/information/detail/?information_id=9542",
"title": "...",
"description": "...",
"image": {
"url": "https://toram-jp.akamaized.net/img/announcement/bossevent/EvilCrystalBeast.png",
"proxy_url": "https://images-ext-1.discordapp.net/external/BLAXtyRBzJUh8MOYHKXTrD5_7tYPwLc6KHgFdZxMm-c/https/toram-jp.akamaized.net/img/announcement/bossevent/EvilCrystalBeast.png",
"width": 1200,
"height": 600,
"flags": 0
},
"thumbnail": {
"url": "https://toram-jp.akamaized.net/tw/img/bg/icon_news_event.png",
"proxy_url": "https://images-ext-1.discordapp.net/external/I1NXoH_V0k3Rw36gASrxdYbCdSd1V09ddqpjLsG4hGw/https/toram-jp.akamaized.net/tw/img/bg/icon_news_event.png",
"width": 0,
"height": 0,
"flags": 0
}
},
{
"type": "rich",
"url": "https://tw.toram.jp/information/detail/?information_id=9542",
"image": {
"url": "https://toram-jp.akamaized.net/img/announcement/bossevent/momfluck.png",
"proxy_url": "https://images-ext-1.discordapp.net/external/yALQhWT3Seyg5TIkN7lSP7aqJ5gYrZKtpyeyps9yoOs/https/toram-jp.akamaized.net/img/announcement/bossevent/momfluck.png",
"width": 0,
"height": 0,
"flags": 0
}
},
{
"type": "rich",
"url": "https://tw.toram.jp/information/detail/?information_id=9542",
"image": {
"url": "https://toram-jp.akamaized.net/img/announcement/bossevent/SandMole.png",
"proxy_url": "https://images-ext-1.discordapp.net/external/fmx-FuQ5YfdIe0Zo-vxNvzxFdI-FGF36aXpffbJf24k/https/toram-jp.akamaized.net/img/announcement/bossevent/SandMole.png",
"width": 1200,
"height": 600,
"flags": 0
}
},
{
"type": "rich",
"url": "https://tw.toram.jp/information/detail/?information_id=9542",
"image": {
"url": "https://toram-jp.akamaized.net/img/announcement/bossevent/thuggolem.png",
"proxy_url": "https://images-ext-1.discordapp.net/external/beB0FUNUGf1q77BbmkcZS5sXNnXOSPXU7856Xc2_lhI/https/toram-jp.akamaized.net/img/announcement/bossevent/thuggolem.png",
"width": 0,
"height": 0,
"flags": 0
}
},
{
"type": "rich",
"url": "https://tw.toram.jp/information/detail/?information_id=9542",
"image": {
"url": "https://toram-jp.akamaized.net/img/announcement/bossevent/Charugon.png",
"proxy_url": "https://images-ext-1.discordapp.net/external/kbIeUhBzjielsQK4Bzqltzq42Iy9DdsemW973h9mXjI/https/toram-jp.akamaized.net/img/announcement/bossevent/Charugon.png",
"width": 1200,
"height": 600,
"flags": 0
}
}
]
}
As you can see, the image URLs were correctly sent to Discord. However, some thumbnails and images have their width and height set to 0, while others are normal.
When testing locally by sending embeds to a single channel, everything seems fine. I'm unsure if the issue arises from sending the same message to multiple server channels in rapid succession.
Hello, I recently encountered this issue as well.
My application is a bot that periodically posts messages, sending embeds with external image URLs to different server channels simultaneously using
@discordjs/rest
. ...
Update: Even when I download the image and upload it as an attachment, I have the same problem. I also tried specifying the width and height of the image in the payload when sending it to discord, but it didn't work either.
"embeds": [
{
"type": "rich",
"url": "https://tw.toram.jp/information/detail/?information_id=9559#s3",
"title": "...",
"description": "...",
"image": {
"url": "https://cdn.discordapp.com/attachments/1282411848074793010/1308688347538919514/toram_avatar_fortunemouse202001.webp?ex=673eda80&is=673d8900&hm=bc94bda7b857e7452ab9cea99a9a8d624c8f94481767577b80e9e65101870481&",
"proxy_url": "https://media.discordapp.net/attachments/1282411848074793010/1308688347538919514/toram_avatar_fortunemouse202001.webp?ex=673eda80&is=673d8900&hm=bc94bda7b857e7452ab9cea99a9a8d624c8f94481767577b80e9e65101870481&",
"width": 400,
"height": 128
}
},
{
"type": "rich",
"url": "https://tw.toram.jp/information/detail/?information_id=9559#s4",
"title": "...",
"description": "...",
"image": {
"url": "https://cdn.discordapp.com/attachments/1282411848074793010/1308688348180906004/toram_orbitemsection.webp?ex=673eda80&is=673d8900&hm=b121d5b3e2bd6c9b06a5e331abb5e00f6fe37a99173f6629cf773728827565d3&",
"proxy_url": "https://media.discordapp.net/attachments/1282411848074793010/1308688348180906004/toram_orbitemsection.webp?ex=673eda80&is=673d8900&hm=b121d5b3e2bd6c9b06a5e331abb5e00f6fe37a99173f6629cf773728827565d3&",
"width": 0,
"height": 0
}
},
{
"type": "rich",
"url": "https://tw.toram.jp/information/detail/?information_id=9559#s5",
"title": "...",
"description": "...",
"image": {
"url": "https://cdn.discordapp.com/attachments/1282411848074793010/1308688352693977098/toram_item.webp?ex=673eda81&is=673d8901&hm=047dbe057a0fb2ba6e706ada728bdc3f79bd9575eb8802e4c26f74edbb3a5b5b&",
"proxy_url": "https://media.discordapp.net/attachments/1282411848074793010/1308688352693977098/toram_item.webp?ex=673eda81&is=673d8901&hm=047dbe057a0fb2ba6e706ada728bdc3f79bd9575eb8802e4c26f74edbb3a5b5b&",
"width": 400,
"height": 200
}
}
]
Description
Hello there,
I stumbled upon a problem with Message Embeds in the discord API.
Using the Java Discord API I am creating a message Embed containing a title, description and an image. However, on about 50% of the cases the image does not show up in the embed.
Steps to Reproduce
Using the Java Discord API I am creating a message embed as follows:
And then I post it using
The code is a little simplified. But its essentially what I do.
When the message embed is posted, sometimes the image does not appear. I used the API to look at the message itself and see that there are some differences, which are described ablow.
Expected Behavior
When creating an image embed with an Image URL I expect it to display correctly within discord itself.
The Message Embed should look something like this:
Current Behavior
Right now in about 50 % of the cases the Image Embed looks like this:
There Width and Height of the Image are not properly set.
Since I am just passing an Image URL and cannot pass things like the width and height myself, I assume there must be a bug somewhere in discord. This was confirmed on the JDA discord server.
Screenshots/Videos
The following image shows two messages. One one which the URL worked, and one on which it did not.
Client and System Information
Using Java Discord API Version 5.0.0 Beta 20 to connect to Discord API
I reproduced the Issue in the following versions on Windows 11 and Discord Client
It was also seen on Android and probably any other platform, since the width and height of the image appear to be incorrectly returned by the API