public static async Task ReplaceImageInStorage(Program project, Look look, PortableImage newImage) { var path = Path.Combine(project.BasePath, StorageConstants.ProgramLooksPath, look.FileName); using (var storage = StorageSystem.GetStorage()) { await storage.SaveImageAsync(path, newImage, true, ImageFormat.Png); look.Image = await storage.LoadImageThumbnailAsync(path); } } }