This commit is contained in:
2025-06-22 15:27:26 +03:00
parent a64ed080bb
commit 2ab819ff30
11 changed files with 650 additions and 13 deletions

View File

@ -125,4 +125,12 @@ class Files
}
}
public static function isImageByExtension($filename): bool
{
$allowedExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp'];
$extension = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
return in_array($extension, $allowedExtensions);
}
}