public static function img($options = null)
    {
        $options = Helper::getOptions($options, [
            "path"      =>  "images/img",
            "basename"  =>  null,
            "filename"  =>  null,
            "width"     =>  null,
            "height"    =>  null,
        ]);

        $path = $options["path"];
        if ($path[0] == "/") {
            $fullpath = $path;
        } else {
            $fullpath = Env::path($path, Env::PATH_DOCUMENT_ROOT);
        }

        $filename = $options["filename"];
        if ($basename = $options["basename"]) {
            $original = $fullpath . "/original/" . $basename;
            if (file_exists($original)) {
                if ($ext = static::getExtension($original)) {
                    $filename = $basename . "." . $ext;
                    copy($original, $fullpath . "/original/" . $filename);
                }
            }
        }

        if (!$filename) {
            throw new \Exception("No image filename provided to use");
        }

        $original = $fullpath . "/original/" . $filename;
        if (!file_exists($original)) {
            throw new \Exception("Original image file does not exist (" . $original . ")");
        }

        $w = $options["width"];
        $h = $options["height"];

        if (!$w && !$h) {
            return $path . "/original/" . $filename;
        }

        if ($w && $h) {
            $dir = "max" . $w . "x" . $h;
        } elseif ($w) {
            $dir = "width" . $w;
        } elseif ($h) {
            $dir = "height" . $h;
        }

        $fullpath .= "/" . $dir;
        $newfile = $fullpath . "/" . $filename;
        $newpath = $path . "/" . $dir . "/" . $filename;

        if (file_exists($newfile)) {
            return $newpath;
        }

        if (!is_dir($fullpath)) {
            mkdir($fullpath, 0777, true);
        }

        static::resize([
            "fromPath"  =>  $original,
            "toPath"    =>  $newfile,
            "width"     =>  $w,
            "height"    =>  $h,
        ]);

        return $newpath;
    }