$image = new \Imagick(); $img_url = "https://phpimagick.com/" . normalisePublicFilePath($this->imageControl->getImagePath()); $fp = fopen($img_url, 'rb'); $image->pingImageFile($fp); $output .= "For file: " . $img_url . " <br/><br/>"; $output .= "Width is " . $image->getImageWidth() . "<br/>"; $output .= "Height is " . $image->getImageHeight() . "<br/>";