certo, basta usare la funzione getimagesize