private function determineWidth(InterventionImage $img, $width): ?int
    {
        if (is_null($width)) {
            return null;
        }