diff --git a/src/MediaData.php b/src/MediaData.php index d459f57..8bc82c0 100644 --- a/src/MediaData.php +++ b/src/MediaData.php @@ -39,9 +39,10 @@ class MediaData extends Data public static function fromMedia(Media $media): self { - $conversions = collect($media->getMediaConversionNames())->flip()->map(fn ($integer, $conversion) => [ - 'original_url' => $media->getFullUrl($conversion), - ]); + $conversions = collect($media->getMediaConversionNames())->flip()->map(fn ($integer, $conversion) => $media->hasGeneratedConversion($conversion) + ? ['original_url' => $media->getFullUrl($conversion)] + : null, + ); return self::withoutMagicalCreationFrom([ ...$media->toArray(),