|
@@ -43,7 +43,7 @@ discard block |
|
|
block discarded – undo |
|
43
|
43
|
private function makeImg($image_file, $name, $location, $width, $height, $quality) |
|
44
|
44
|
{ |
|
45
|
45
|
$image = $image_file->storeAs($location, $name, 'public'); // Thumbnail Storage Information |
|
46
|
|
- $img = Image::cache(function ($cached_img) use ($image_file, $width, $height) { |
|
|
46
|
+ $img = Image::cache(function($cached_img) use ($image_file, $width, $height) { |
|
47
|
47
|
return $cached_img->make($image_file->getRealPath())->fit($width, $height); |
|
48
|
48
|
}, config('thumbnail.image_cached_time', 10), true); //Storing Thumbnail |
|
49
|
49
|
$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 |
|
@@ -224,7 +224,7 @@ discard block |
|
|
block discarded – undo |
|
224
|
224
|
} else { |
|
225
|
225
|
false; |
|
226
|
226
|
} |
|
227
|
|
-<<<<<<< HEAD |
|
|
227
|
+<< << <<< HEAD |
|
228
|
228
|
======= |
|
229
|
229
|
} elseif ($image->getFileNameWithoutExtension() == $parent_name) { |
|
230
|
230
|
$images_property['has_thumbnail'] = ($thumbnail_exists ?? false); |
|
@@ -263,6 +263,4 @@ discard block |
|
|
block discarded – undo |
|
263
|
263
|
// Valid Image Name |
|
264
|
264
|
private function validImageName($name) |
|
265
|
265
|
{ |
|
266
|
|
- return strtolower(str_replace([' ', '-', '$', '<', '>', '&', '{', '}', '*', '\\', '/', ':' . ';', ',', "'", '"'], '_', trim($name))); |
|
267
|
|
- } |
|
268
|
|
-} |
|
|
266
|
+ return strtolower(str_replace([' ', '-', '$', '<', '>', '&', '{', '}', '*', '\\', '/', ':' . ';', ',', "'", '"'], '_', trim($name |
|
269
|
267
|
\ No newline at end of file |