private function getImagePath($keyImg)
    {
        $upload_path = wp_upload_dir();
        $img = $this->getImage($keyImg, User::AVATAR_SIZE_ICO);
        $path = str_replace($upload_path['baseurl'], $upload_path['basedir'], $img);
        $current = $base = basename($path);
        if (strpos($base, '-') !== false) {
            preg_match('/\.[^\.]+$/i', $current, $ext);
            $_base = substr($base, 0, strpos($base, "-")) . $ext[0];
            $pathBase = str_replace($current, $_base, $path);
        }
        // and the virgen path
        $_base_virgen = substr($base, 0, strpos($base, "-"));
        $virgen = str_replace($current, $_base_virgen, $path);
        return [
            'current' => $path,
            'base' => $pathBase,
            'virgen' => $virgen,
            'ext' => $ext[0],
        ];
    }
private function getImagePath($keyImg)
    {
        $upload_path = wp_upload_dir();
        $img = $this->getImage($keyImg, User::AVATAR_SIZE_ICO);
        $path = str_replace($upload_path['baseurl'], $upload_path['basedir'], $img);
        $current = $base = basename($path);
        if (strpos($base, '-') !== false) {
            preg_match('/\.[^\.]+$/i', $current, $ext);
            $_base = substr($base, 0, strpos($base, "-")) . $ext[0];
            $pathBase = str_replace($current, $_base, $path);
        }
        // and the virgen path
        $_base_virgen = substr($base, 0, strpos($base, "-"));
        $virgen = str_replace($current, $_base_virgen, $path);
        return [
            'current' => $path,
            'base' => $pathBase,
            'virgen' => $virgen,
            'ext' => $ext[0],
        ];
    }
private function getImagePath ( $ keyImg ) { $ upload_path = wp_upload_dir ( ) ; $ img = $ this -> getImage ( $ keyImg , User :: AVATAR_SIZE_ICO ) ; $ path = str_replace ( $ upload_path [ 'baseurl' ] , $ upload_path [ 'basedir' ] , $ img ) ; $ current = $ base = basename ( $ path ) ; if ( strpos ( $ base , '-' ) !== false ) { preg_match ( '/\.[^\.]+$/i' , $ current , $ ext ) ; $ _base = substr ( $ base , 0 , strpos ( $ base , "-" ) ) . $ ext [ 0 ] ; $ pathBase = str_replace ( $ current , $ _base , $ path ) ; } // and the virgen path $ _base_virgen = substr ( $ base , 0 , strpos ( $ base , "-" ) ) ; $ virgen = str_replace ( $ current , $ _base_virgen , $ path ) ; return [ 'current' => $ path , 'base' => $ pathBase , 'virgen' => $ virgen , 'ext' => $ ext [ 0 ] , ] ; }
Return the base name of the img and the name of the current img.

for example [
'current' => 'Chemaclass_avatar-26x26.png',
'base' => 'Chemaclass_avatar.png',
'virgen' => 'Chemaclass_avatar',
'ext' => '.png',
];

@return array<string> List with the current name, base, virgen and extension of the image
Return the base name of the img and the name of the current img .