add fallback for nbo conversion
This commit is contained in:
parent
8a4dc77cfa
commit
fb7f70fb12
|
@ -39,9 +39,10 @@ class MediaData extends Data
|
||||||
|
|
||||||
public static function fromMedia(Media $media): self
|
public static function fromMedia(Media $media): self
|
||||||
{
|
{
|
||||||
$conversions = collect($media->getMediaConversionNames())->flip()->map(fn ($integer, $conversion) => [
|
$conversions = collect($media->getMediaConversionNames())->flip()->map(fn ($integer, $conversion) => $media->hasGeneratedConversion($conversion)
|
||||||
'original_url' => $media->getFullUrl($conversion),
|
? ['original_url' => $media->getFullUrl($conversion)]
|
||||||
]);
|
: null,
|
||||||
|
);
|
||||||
|
|
||||||
return self::withoutMagicalCreationFrom([
|
return self::withoutMagicalCreationFrom([
|
||||||
...$media->toArray(),
|
...$media->toArray(),
|
||||||
|
|
Loading…
Reference in New Issue