Local Driver Checking
This commit is contained in:
parent
805afe63fc
commit
85293ca642
|
|
@ -138,7 +138,7 @@ class ProductImage extends AbstractProduct
|
|||
*/
|
||||
private function getCachedImageUrls($path): array
|
||||
{
|
||||
if (config('filesystems.default') !== 'public') {
|
||||
if (! $this->isDriverLocal()) {
|
||||
return [
|
||||
'small_image_url' => Storage::url($path),
|
||||
'medium_image_url' => Storage::url($path),
|
||||
|
|
@ -169,4 +169,14 @@ class ProductImage extends AbstractProduct
|
|||
'original_image_url' => asset('vendor/webkul/ui/assets/images/product/large-product-placeholder.webp'),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Is driver local.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function isDriverLocal(): bool
|
||||
{
|
||||
return Storage::getAdapter() instanceof \League\Flysystem\Adapter\Local;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue