Replace InterventionImage::read with InterventionImage::decodePath for image processing

This commit is contained in:
2026-06-20 22:18:51 +05:00
parent 85a4361d0c
commit 9a6604a40b
@@ -9,7 +9,7 @@ final readonly class ResizeCommandHandler
{ {
public function resize(Storage $storage, int $width, int $height): Storage public function resize(Storage $storage, int $width, int $height): Storage
{ {
$image = InterventionImage::read($storage->path); $image = InterventionImage::decodePath($storage->path);
if ($image->width() < $width && $image->height() < $height) { if ($image->width() < $width && $image->height() < $height) {
return $storage; return $storage;
} }
@@ -23,7 +23,7 @@ final readonly class ResizeCommandHandler
public function width(Storage $storage, int $width): Storage public function width(Storage $storage, int $width): Storage
{ {
$image = InterventionImage::read($storage->path); $image = InterventionImage::decodePath($storage->path);
if ($image->width() < $width) { if ($image->width() < $width) {
return $storage; return $storage;
} }
@@ -37,7 +37,7 @@ final readonly class ResizeCommandHandler
public function height(Storage $storage, int $height): Storage public function height(Storage $storage, int $height): Storage
{ {
$image = InterventionImage::read($storage->path); $image = InterventionImage::decodePath($storage->path);
if ($image->height() < $height) { if ($image->height() < $height) {
return $storage; return $storage;
} }