getimagesize

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Get the size of an image
<?php getimagesize(string $filename, array &$image_info = null): array|false
<?php         $manager->copy("source://{$this->asset->path()}", $destination);



        try {

            $size = getimagesize($cache->getAdapter()->getPathPrefix().$cachePath);

        } catch (\Exception $e) {

            $size = [0, 0];

        } finally {
<?php             if ($this->isResizable($item)) {

                $path = $this->generateImage($item);



                [$width, $height] = getimagesize($this->getServer()->getCache()->getAdapter()->getPathPrefix().$path);



                $data['width'] = $width;

                $data['height'] = $height;
<?php         $realpath = Storage::disk('test')->getAdapter()->getPathPrefix().'path/to/asset.jpg';

        $this->assertFileExists($realpath);

        $imagesize = getimagesize($realpath);

        $this->assertEquals([30, 60], array_splice($imagesize, 0, 2));



        $dimensions = $this->dimensions->asset($asset);