diff --git a/Jellyfin.Api/Controllers/ImageController.cs b/Jellyfin.Api/Controllers/ImageController.cs
index c08d18e2dc..cd8132d215 100644
--- a/Jellyfin.Api/Controllers/ImageController.cs
+++ b/Jellyfin.Api/Controllers/ImageController.cs
@@ -1458,6 +1458,7 @@ public class ImageController : BaseJellyfinApiController
///
/// User id.
/// Optional. Supply the cache tag from the item object to receive strong caching headers.
+ /// Determines the output format of the image - original,gif,jpg,png.
/// Image stream returned.
/// User id not provided.
/// Item not found.
@@ -1473,7 +1474,8 @@ public class ImageController : BaseJellyfinApiController
[ProducesImageFile]
public async Task GetUserImage(
[FromQuery] Guid? userId,
- [FromQuery] string? tag)
+ [FromQuery] string? tag,
+ [FromQuery] ImageFormat? format)
{
var requestUserId = userId ?? User.GetUserId();
if (requestUserId.IsEmpty())
@@ -1499,7 +1501,7 @@ public class ImageController : BaseJellyfinApiController
ImageType.Profile,
null,
tag,
- ImageFormat.Jpg,
+ format,
null,
null,
null,
@@ -1570,7 +1572,8 @@ public class ImageController : BaseJellyfinApiController
[FromQuery] int? imageIndex)
=> GetUserImage(
userId,
- tag);
+ tag,
+ format);
///
/// Get user profile image.
@@ -1625,19 +1628,22 @@ public class ImageController : BaseJellyfinApiController
[FromQuery] string? foregroundLayer)
=> GetUserImage(
userId,
- tag);
+ tag,
+ format);
///
/// Generates or gets the splashscreen.
///
/// Supply the cache tag from the item object to receive strong caching headers.
+ /// Determines the output format of the image - original,gif,jpg,png.
/// Splashscreen returned successfully.
/// The splashscreen.
[HttpGet("Branding/Splashscreen")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesImageFile]
public async Task GetSplashscreen(
- [FromQuery] string? tag)
+ [FromQuery] string? tag,
+ [FromQuery] ImageFormat? format)
{
var brandingOptions = _serverConfigurationManager.GetConfiguration("branding");
var isAdmin = User.IsInRole(Constants.UserRoles.Administrator);
@@ -1662,7 +1668,7 @@ public class ImageController : BaseJellyfinApiController
}
}
- var outputFormats = GetOutputFormats(ImageFormat.Jpg);
+ var outputFormats = GetOutputFormats(format);
TimeSpan? cacheDuration = null;
if (!string.IsNullOrEmpty(tag))