Skip to content

Commit

Permalink
Merge asset data instead of overriding (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmeijer97 authored May 30, 2023
1 parent 092d1b4 commit b1a7ef9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Actions/ResizeImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function resize(Asset $asset, ?int $width = null, ?int $height = null): v

$asset->disk()->filesystem()->put($asset->path(), $image->encode());

$asset->data(['image-optimized' => '1']);
$asset->merge(['image-optimized' => '1']);

$asset->save();
$asset->meta();
Expand All @@ -37,4 +37,4 @@ public static function bind(): void
{
app()->singleton(ResizesImage::class,static::class);
}
}
}

0 comments on commit b1a7ef9

Please sign in to comment.