public static function imageSize($file, $options)
    {
        if (!isset($options['height']) && !isset($options['width'])) {
            throw new InvalidArgumentException('Invalid image size validation parameters! Missing `width` and / or `height`.');
        }

        $filename = static::getFilename($file);

        list($width, $height) = getimagesize($filename);

        $validHeight = $validWidth = null;

        if (isset($options['height'])) {
            $validHeight = self::comparison($height, $options['height'][0], $options['height'][1]);
        }
        if (isset($options['width'])) {
            $validWidth = self::comparison($width, $options['width'][0], $options['width'][1]);
        }
        if ($validHeight !== null && $validWidth !== null) {
            return ($validHeight && $validWidth);
        }
        if ($validHeight !== null) {
            return $validHeight;
        }
        if ($validWidth !== null) {
            return $validWidth;
        }

        throw new InvalidArgumentException('The 2nd argument is missing the `width` and / or `height` options.');
    }