public async Task <FileResult> GetProfilePictureByUser(long userId) { var output = await _profileAppService.GetProfilePictureByUser(userId); if (output.ProfilePicture.IsNullOrEmpty()) { return(GetDefaultProfilePictureInternal()); } return(File(Convert.FromBase64String(output.ProfilePicture), MimeTypeNames.ImageJpeg)); }