Images and script are hosted on the same account (one site), but we know only the URL of the image.
$image = \"http://example.com/images/full-1091.jpg\"
Use filesize function like this:
echo filesize($filename) . ' bytes';
You can also format the unit of the size with this function:
function format_size($size) {
$sizes = array(" Bytes", " KB", " MB", " GB", " TB", " PB", " EB", " ZB", " YB");
if ($size == 0) { return('n/a'); } else {
return (round($size/pow(1024, ($i = floor(log($size, 1024)))), 2) . $sizes[$i]); }
}