|
@@ -44,7 +44,7 @@ discard block |
|
|
block discarded – undo |
|
44
|
44
|
private function makeImg($image_file, $name, $location, $width, $height, $quality) |
|
45
|
45
|
{ |
|
46
|
46
|
$image = $image_file->storeAs($location, $name, 'public'); // Thumbnail Storage Information |
|
47
|
|
- $img = Image::cache(function ($cached_img) use ($image_file, $width, $height) { |
|
|
47
|
+ $img = Image::cache(function($cached_img) use ($image_file, $width, $height) { |
|
48
|
48
|
return $cached_img->make($image_file->getRealPath())->fit($width, $height); |
|
49
|
49
|
}, config('thumbnail.image_cached_time', 10), true); //Storing Thumbnail |
|
50
|
50
|
$img->save(public_path('storage/' . $image), $quality); //Storing Thumbnail |
|
@@ -128,7 +128,7 @@ discard block |
|
|
block discarded – undo |
|
128
|
128
|
$fieldname => $img->storeAs($custom['storage'] ?? config('thumbnail.storage_path', 'uploads'), $imageStoreName, 'public'), // Storing Parent Image |
|
129
|
129
|
]); |
|
130
|
130
|
|
|
131
|
|
- $image = Image::cache(function ($cached_img) use ($image_file, $custom) { |
|
|
131
|
+ $image = Image::cache(function($cached_img) use ($image_file, $custom) { |
|
132
|
132
|
return $cached_img->make($image_file->getRealPath())->fit($custom['width'] ?? config('thumbnail.img_width', 1000), $custom['height'] ?? config('thumbnail.img_height', 800)); //Parent Image Interventing |
|
133
|
133
|
}, config('thumbnail.image_cached_time', 10), true); |
|
134
|
134
|
$image->save(public_path('storage/' . $this->$fieldname), $custom['quality'] ?? config('thumbnail.image_quality', 80)); // Parent Image Locating Save |