php get image file size code example Example: get file size in php $img = get_headers("file URL", 1); echo $img["Content-Length"];