Skip to content

Commit

Permalink
fix cache
Browse files Browse the repository at this point in the history
  • Loading branch information
denis-kisel committed Jun 21, 2019
1 parent 7b34c61 commit dfd1a4f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/SmartImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ public static function name($image, $width, $height)

public static function cache($image, $width = null, $height = null)
{
if (empty($image) || !file_exists(storage_path('app/public/' . $image))) {
return;
}

$resizedName = self::name($image, $width, $height);

if (config('app.debug') || !file_exists(storage_path('app/public/image_cache/' . $resizedName))) {
Expand Down

0 comments on commit dfd1a4f

Please sign in to comment.