src/MalScraper/Helper/Helper.php
public static function imageUrlCleaner($str)
    {
        preg_match('/(questionmark)|(qm_50)/', $str, $temp_image);
        $str = $temp_image ? '' : $str;
        $str = str_replace(['v.jpg', 't.jpg'], '.jpg', $str);
        $str = str_replace('_thumb.jpg', '.jpg', $str);
        $str = str_replace('userimages/thumbs', 'userimages', $str);
        $str = preg_replace('/r\/\d{1,3}x\d{1,3}\//', '', $str);
        $str = preg_replace('/\?.+/', '', $str);

        return $str;
    }
public static function imageUrlCleaner($str)
    {
        preg_match('/(questionmark)|(qm_50)/', $str, $temp_image);
        $str = $temp_image ? '' : $str;
        $str = str_replace(['v.jpg', 't.jpg'], '.jpg', $str);
        $str = str_replace('_thumb.jpg', '.jpg', $str);
        $str = str_replace('userimages/thumbs', 'userimages', $str);
        $str = preg_replace('/r\/\d{1,3}x\d{1,3}\//', '', $str);
        $str = preg_replace('/\?.+/', '', $str);

        return $str;
    }
public static function imageUrlCleaner ( $ str ) { preg_match ( '/(questionmark)|(qm_50)/' , $ str , $ temp_image ) ; $ str = $ temp_image ? '' : $ str ; $ str = str_replace ( [ 'v.jpg' , 't.jpg' ] , '.jpg' , $ str ) ; $ str = str_replace ( '_thumb.jpg' , '.jpg' , $ str ) ; $ str = str_replace ( 'userimages/thumbs' , 'userimages' , $ str ) ; $ str = preg_replace ( '/r\/\d{1,3}x\d{1,3}\//' , '' , $ str ) ; $ str = preg_replace ( '/\?.+/' , '' , $ str ) ; return $ str ; }
Clean image URL.

@param string $str

@return string
Clean image URL .