public static function squeeze($source, $target, $breakpoint = SQUEEZR_BREAKPOINT, array &$errors = array())
    {
        $returnImage = null;

        // Determine the image dimensions
        list($width, $height, $type) = getImageSize($source);

        // Determine the target width (considering the breakpoint)
        $targetWidth = intval($breakpoint);

        // If the image image has to be downsampled at all
        if ($width > $targetWidth) {

            // Prepare basic target parameters
            $targetHeight = round($targetWidth * $height / $width);

            switch ($type) {
                case IMAGETYPE_PNG:
                    $saved = self::_downscalePng($source, $width, $height, $target, $targetWidth, $targetHeight);
                    break;
                case IMAGETYPE_JPEG:
                    $saved = self::_downscaleJpeg($source, $width, $height, $target, $targetWidth, $targetHeight);
                    break;
                case IMAGETYPE_GIF:
                    $saved = self::_downscaleGif($source, $width, $height, $target, $targetWidth, $targetHeight);
                    break;
                default:
                    $saved = false;
            }

            // If target image could be created: Send it
            if ($saved && @file_exists($target)) {
                $returnImage = $target;

                // Else: Error
            } else {
                $errors[\Tollwerk\Squeezr\Exception::FAILED_DOWNSAMPLE_CACHE] = \Tollwerk\Squeezr\Exception::FAILED_DOWNSAMPLE_CACHE_MSG;
            }

            // Else: No downsampling necessary, try to cache a copy of the original image to avoid subsequent squeeze attempts
        } elseif (!@symlink($source, $target) && (SQUEEZR_IMAGE_COPY_UNDERSIZED ? !@copy($source, $target) : true)) {
            $errors[\Tollwerk\Squeezr\Exception::FAILED_COPY_CACHE] = \Tollwerk\Squeezr\Exception::FAILED_COPY_CACHE_MSG;

            // Else: Return target image
        } else {
            $returnImage = $target;
        }

        return $returnImage;
    }