diff --git a/Flow.Launcher.Infrastructure/Constant.cs b/Flow.Launcher.Infrastructure/Constant.cs index 8a95ee79f..c22355495 100644 --- a/Flow.Launcher.Infrastructure/Constant.cs +++ b/Flow.Launcher.Infrastructure/Constant.cs @@ -31,6 +31,7 @@ namespace Flow.Launcher.Infrastructure public static readonly string ErrorIcon = Path.Combine(ImagesDirectory, "app_error.png"); public static readonly string MissingImgIcon = Path.Combine(ImagesDirectory, "app_missing_img.png"); public static readonly string LoadingImgIcon = Path.Combine(ImagesDirectory, "loading.png"); + public static readonly string NoImageIcon = Path.Combine(ImagesDirectory, "no_image.png"); public static string PythonPath; public static string NodePath; diff --git a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs index 4592269a2..10c769ca6 100644 --- a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs +++ b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs @@ -22,6 +22,7 @@ namespace Flow.Launcher.Infrastructure.Image private static readonly ConcurrentDictionary GuidToKey = new(); private static IImageHashGenerator _hashGenerator; private static readonly bool EnableImageHash = true; + public static ImageSource NoImage { get; } = new BitmapImage(new Uri(Constant.NoImageIcon)); public static ImageSource MissingImage { get; } = new BitmapImage(new Uri(Constant.MissingImgIcon)); public static ImageSource LoadingImage { get; } = new BitmapImage(new Uri(Constant.LoadingImgIcon)); public const int SmallIconSize = 64; @@ -222,7 +223,7 @@ namespace Flow.Launcher.Infrastructure.Image } catch (NotSupportedException) { - image = null; + image = NoImage; type = ImageType.Error; } } diff --git a/Flow.Launcher/Images/no_image.png b/Flow.Launcher/Images/no_image.png new file mode 100644 index 000000000..f8608727b Binary files /dev/null and b/Flow.Launcher/Images/no_image.png differ