diff --git a/src/Discord.Net.Core/CDN.cs b/src/Discord.Net.Core/CDN.cs
index 0fefc9a0d..92e8b1239 100644
--- a/src/Discord.Net.Core/CDN.cs
+++ b/src/Discord.Net.Core/CDN.cs
@@ -51,11 +51,18 @@ namespace Discord
///
/// The guild snowflake identifier.
/// The icon identifier.
+ /// The size of the image to return in. This can be any power of two between 16 and 2048.
+ /// The format to return.
///
- /// A URL pointing to the guild's icon.
+ /// A URL pointing to the guild's icon in the specified size.
///
- public static string GetGuildIconUrl(ulong guildId, string iconId)
- => iconId != null ? $"{DiscordConfig.CDNUrl}icons/{guildId}/{iconId}.jpg" : null;
+ public static string GetGuildIconUrl(ulong guildId, string iconId, ushort size, ImageFormat format)
+ {
+ if (iconId == null)
+ return null;
+ string extension = FormatToExtension(format, iconId);
+ return $"{DiscordConfig.CDNUrl}icons/{guildId}/{iconId}.{extension}?size={size}";
+ }
///
/// Returns a guild splash URL.
///
diff --git a/src/Discord.Net.Core/Entities/Guilds/IGuild.cs b/src/Discord.Net.Core/Entities/Guilds/IGuild.cs
index 3b35796b9..826b4ff2f 100644
--- a/src/Discord.Net.Core/Entities/Guilds/IGuild.cs
+++ b/src/Discord.Net.Core/Entities/Guilds/IGuild.cs
@@ -72,7 +72,7 @@ namespace Discord
///
/// A URL pointing to the guild's icon; null if none is set.
///
- string IconUrl { get; }
+ string GetIconUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128);
///
/// Gets the ID of this guild's splash image.
///
diff --git a/src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs b/src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs
index a847998b5..1cf586a7c 100644
--- a/src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs
+++ b/src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs
@@ -59,7 +59,8 @@ namespace Discord.Rest
[Obsolete("DefaultChannelId is deprecated, use GetDefaultChannelAsync")]
public ulong DefaultChannelId => Id;
///
- public string IconUrl => CDN.GetGuildIconUrl(Id, IconId);
+ public string GetIconUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128)
+ => CDN.GetGuildIconUrl(Id, IconId, size, format);
///
public string SplashUrl => CDN.GetGuildSplashUrl(Id, SplashId);
diff --git a/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs b/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs
index ca2db1a77..f22b4705c 100644
--- a/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs
+++ b/src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs
@@ -97,7 +97,8 @@ namespace Discord.WebSocket
///
public DateTimeOffset CreatedAt => SnowflakeUtils.FromSnowflake(Id);
///
- public string IconUrl => CDN.GetGuildIconUrl(Id, IconId);
+ public string GetIconUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128)
+ => CDN.GetGuildIconUrl(Id, IconId, size, format);
///
public string SplashUrl => CDN.GetGuildSplashUrl(Id, SplashId);
/// Indicates whether the client has all the members downloaded to the local guild cache.