public function imageSpecs(string $size): array
    {
        $specs = wp_get_additional_image_sizes();

        if ($size === 'thumbnail' && !isset($specs[$size])) {
            $width        = (int) get_option('thumbnail_size_w');
            $height       = (int) get_option('thumbnail_size_h');
            $crop         = (bool) get_option('thumbnail_crop');
            return $specs = compact('width', 'height', 'crop');
        }
        return $specs = $specs[$size] ?? [];
    }
public function imageSpecs(string $size): array
    {
        $specs = wp_get_additional_image_sizes();

        if ($size === 'thumbnail' && !isset($specs[$size])) {
            $width        = (int) get_option('thumbnail_size_w');
            $height       = (int) get_option('thumbnail_size_h');
            $crop         = (bool) get_option('thumbnail_crop');
            return $specs = compact('width', 'height', 'crop');
        }
        return $specs = $specs[$size] ?? [];
    }
public function imageSpecs ( string $ size ) : array { $ specs = wp_get_additional_image_sizes ( ) ; if ( $ size === 'thumbnail' && ! isset ( $ specs [ $ size ] ) ) { $ width = ( int ) get_option ( 'thumbnail_size_w' ) ; $ height = ( int ) get_option ( 'thumbnail_size_h' ) ; $ crop = ( bool ) get_option ( 'thumbnail_crop' ) ; return $ specs = compact ( 'width' , 'height' , 'crop' ) ; } return $ specs = $ specs [ $ size ] ?? [ ] ; }
Get image specs.

@since 17xxxx Initial release.

@param string $size For which size?

@return array `[width, height, crop]`.
Get image specs .