Make webp default format for images

This commit is contained in:
DariusIII
2026-07-16 15:57:20 +02:00
parent 17be0e11d2
commit b27fb8d86b
60 changed files with 1154 additions and 1136 deletions
@@ -0,0 +1,27 @@
<?php
declare(strict_types=1);
namespace App\Support\Data;
final readonly class ImageProcessingResult
{
private function __construct(
public bool $success,
public ?string $path,
public ?int $width,
public ?int $height,
public ?string $mimeType,
public ?string $failureReason,
) {}
public static function success(string $path, int $width, int $height, string $mimeType): self
{
return new self(true, $path, $width, $height, $mimeType, null);
}
public static function failure(string $reason): self
{
return new self(false, null, null, null, null, $reason);
}
}