Skip to content

Commit 87188ff

Browse files
committed
Correction ImageTag
1 parent 4d5fa0e commit 87188ff

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/HasImageUploads.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,11 @@ public function imageUrl($field = null)
8585
$this->uploadFieldOptions = $this->getUploadFieldOptions($this->uploadFieldName);
8686

8787
// get the model attribute value
88-
$attributeValue = $this->getOriginal($this->uploadFieldName);
88+
if(Arr::get($this->uploadFieldOptions, 'update_database',true)){
89+
$attributeValue = $this->getOriginal($this->uploadFieldName);
90+
}else{
91+
$attributeValue = $this->getFileUploadPath($field);
92+
}
8993

9094
// check for placeholder defined in option
9195
$placeholderImage = Arr::get($this->uploadFieldOptions, 'placeholder');

0 commit comments

Comments
 (0)