diff --git a/source/FFImageLoading.Forms/CachedImage.cs b/source/FFImageLoading.Forms/CachedImage.cs index 7e02af62a..48c016b81 100644 --- a/source/FFImageLoading.Forms/CachedImage.cs +++ b/source/FFImageLoading.Forms/CachedImage.cs @@ -528,7 +528,7 @@ protected override SizeRequest OnMeasure(double widthConstraint, double heightCo height = desiredHeight * (width / desiredWidth); } - return new SizeRequest(new Size(width, height)); + return new SizeRequest(new Size(double.IsNaN(width) ? 0 : width, double.IsNaN(height) ? 0 : height)); } if (double.IsPositiveInfinity(widthConstraint) && double.IsPositiveInfinity(heightConstraint))