public function getAttributeValue($key)
{
$value = parent::getAttributeValue($key);
if (in_array($key, $this->image_fields)) {
$value = $this->retrievePhotoFieldValue($key, $value);
if (!file_exists(public_path() . $value->original->url) || empty($value->original->url)) {
$value = ImageService::getImageObject();
$this->attributes[$key] = $value->toJson();
}
}
return $value;
}