private byte[] CreateThumbnail(byte[] entry, string formatExtension = ".jpg") { if (!formatExtension.StartsWith(".")) { formatExtension = "." + formatExtension; } try { using var thumbnail = Image.ThumbnailBuffer(entry, ThumbnailWidth); return(thumbnail.WriteToBuffer(formatExtension)); } catch (Exception ex) { _logger.LogError(ex, "[CreateThumbnail] There was a critical error and prevented thumbnail generation. Defaulting to no cover image"); } return(Array.Empty <byte>()); }