When sending Discord webhook embeds, you may notice that image URLs from certain domains are stripped or fail to display as a preview. The embed shows the text and title correctly, but the image field appears blank or shows a broken link icon. This happens because Discord’s embed service restricts image loading from specific domains for security and performance reasons. This article explains why Discord strips image URLs from certain domains and provides step-by-step fixes to ensure your webhook images display correctly.
Key Takeaways: Fixing Discord Webhook Embed Image URL Restrictions
- Discord’s image proxy whitelist: Only images from approved domains are cached and displayed in embeds; all others are stripped.
- Use a direct image URL from a whitelisted domain: Switch your image source to a domain like i.imgur.com, cdn.discordapp.com, or media.giphy.com.
- Self-host with a proxy or CDN: Route your image through a service like Cloudflare or a dedicated image CDN to bypass domain restrictions.
Why Discord Strips Image URLs from Specific Domains
Discord uses an internal image proxy to load embed images. This proxy caches images from a whitelist of trusted domains. When your webhook embed includes an image URL from a domain not on that whitelist, Discord strips the image URL from the embed. The embed may still show the title, description, and other fields, but the image field is ignored entirely.
The whitelist includes domains like i.imgur.com, cdn.discordapp.com, media.giphy.com, and a few others. Domains that are not whitelisted include many personal websites, static hosting services like GitHub Pages, and custom CDN endpoints. Discord does not publish the full whitelist, so testing is required to confirm whether a domain works.
The root cause is security: Discord only caches images from domains it trusts to serve safe, stable content. Images from unlisted domains are not fetched, cached, or displayed in embeds. This is not a bug but a deliberate design choice to protect users from malicious or broken image links.
Steps to Fix Stripped Image URLs in Discord Webhook Embeds
You have three main approaches to fix the issue. Choose the method that best fits your setup.
Method 1: Change the Image Source to a Whitelisted Domain
- Identify the current image URL
Locate the image URL you are using in your webhook embed. It may be something likehttps://example.com/images/photo.png. - Upload the image to a whitelisted host
Upload the image to a domain known to work with Discord embeds. Recommended hosts:
– Imgur:https://i.imgur.com/
– Giphy:https://media.giphy.com/
– Discord CDN: upload the image to a Discord channel, then copy the link fromhttps://cdn.discordapp.com/ - Update your webhook embed URL
Replace the old image URL with the new whitelisted URL in your webhook payload. For example, change"image": { "url": "https://example.com/photo.png" }to"image": { "url": "https://i.imgur.com/abc123.png" }. - Test the webhook
Send the webhook to a test channel. Verify the image appears in the embed preview.
Method 2: Use a Proxy or CDN to Serve the Image
- Set up a Cloudflare proxy or a simple redirect
Create a subdomain on a whitelisted domain (if you own one) or use a service like Cloudflare Workers to proxy the image. For example, configure a worker that fetcheshttps://example.com/photo.pngand serves it fromhttps://your-worker.workers.dev/photo.png. Cloudflare Workers are not whitelisted by default, but you can test if the resulting URL works. - Use a dedicated image CDN like Cloudinary or Imgix
Upload your image to a CDN that has a whitelisted domain. Cloudinary, for instance, useshttps://res.cloudinary.com/, which may work. Test each CDN’s domain with a sample embed. - Update the webhook embed URL
Replace the original image URL with the proxy or CDN URL. - Test the webhook
Send the webhook and confirm the image loads.
Method 3: Use a Discord Bot to Post the Embed
- Create a Discord bot with the necessary permissions
If you control a Discord bot, use it to send the embed instead of a webhook. Bots can use theEmbedBuilderwith an image URL from any domain. The bot’s embed is not subject to the same domain restrictions because the bot sends the embed directly to the Discord API. - Write the bot code to send the embed
Example in Discord.js:const embed = new EmbedBuilder().setImage('https://example.com/photo.png');
channel.send({ embeds: }); - Test the bot’s embed
Run the bot and verify the image displays in the channel.
If Discord Still Strips the Image URL After the Main Fix
Image URL Does Not End with a Supported File Extension
Discord’s embed parser expects image URLs to end with common extensions like .png, .jpg, .gif, or .webp. If your URL ends with a query string, a fragment, or no extension at all, Discord may not recognize it as an image. Add the correct extension to the URL or use a URL that includes it.
Image Is Too Large
Discord limits embed images to 8 MB in file size. If the image exceeds this limit, it will be stripped. Compress the image to under 8 MB using an image optimization tool or reduce its dimensions.
Domain Is Blocked by Discord’s Abuse Filters
Some domains are explicitly blocked due to past abuse. Even if the domain is technically whitelisted, Discord may block it if it has been used to serve malicious content. Switch to a different whitelisted domain or use a bot to post the embed.
Whitelisted vs Non-Whitelisted Domains for Discord Embeds
| Item | Whitelisted Domain | Non-Whitelisted Domain |
|---|---|---|
| Image display in embed | Shows immediately | Stripped or broken |
| Examples | i.imgur.com, cdn.discordapp.com, media.giphy.com | example.com, yoursite.netlify.app, raw.githubusercontent.com |
| Caching | Discord caches the image | No caching |
| Workaround needed | None | Change URL, use proxy, or use bot |
Now you can fix stripped image URLs in your Discord webhook embeds by switching to a whitelisted domain, using a proxy, or sending the embed via a bot. Start by testing your current image URL against a known whitelisted domain like i.imgur.com. For advanced control, consider using a Discord bot with the EmbedBuilder class to bypass domain restrictions entirely.