Codice PHP:
$size "100000"// grandezza in byte...

//tipi di immagini

$tipo1 "image/pjpeg"//Jpeg tipo 1

$tipo2 "image/jpeg"//Jpeg tipo2

$tipo3 "image/gif"//Gif  etc... puoi mettere quelli che vuoi..

if ($_FILES['img1']['size'] > $size
            {
            
$log"Il file è troppo grande";
            }else{
    if ((
$_FILES['img1']['type'] == $tipo1) or ($_FILES['img1']['type'] == $tipo2) or ($_FILES['img1']['type'] == $tipo3)) 
    {
qui uploadi il tuo file...
}

una robba del genere... spero di esserti stato utile...