acceptedTypes('image/*'); $this->thumbnail(function () { return $this->value ? Storage::disk($this->getStorageDisk())->url($this->value) : null; })->preview(function () { return $this->value ? Storage::disk($this->getStorageDisk())->url($this->value) : null; }); } /** * Prepare the field element for JSON serialization. * * @return array */ public function jsonSerialize(): array { return array_merge(parent::jsonSerialize(), $this->imageAttributes()); } }