src/includes/classes/Core/Utils/FileExt.php
public function set(string $file, string $ext): string
    {
        if (!$file || !$ext) {
            return $file; // Not possible.
        }
        return $file = preg_replace('/\.[^.]+$/ui', '', $file).'.'.$ext;
    }
public function set(string $file, string $ext): string
    {
        if (!$file || !$ext) {
            return $file; // Not possible.
        }
        return $file = preg_replace('/\.[^.]+$/ui', '', $file).'.'.$ext;
    }
Set file extension.

@since 17xxxx Extension utils.

@param string $file Image file.
@param string $ext  New extension.

@return string File w/ extension.