scaleflex/next-cloudimage-responsive

URL-Bug

Opened this issue · 0 comments

Unfortunately, if I leave the baseURL empty and set the apiVersion to null, the URL is not output correctly:

export default function App({ Component, pageProps }) {
    const cloudimageConfig = {
        token: "mytoken",
        baseURL: "/",
        apiVersion: null,
        ssr: true
    };
    
    return (
        <CloudimageProvider config={cloudimageConfig}>
            <Component {...pageProps} />
        </CloudimageProvider>
    )
}

The image output looks like this:

<Img src="https://backend.k-aktuell.de/wp-content/uploads/2023/09/placeholder-scaled.jpg" className={styles["logo"]} width="300" height="64" />

The following URL is output:

https://mytoken.cloudimg.iohttps://backend.k-aktuell.de/wp-content/uploads/2023/09/placeholder-scaled.jpg?org_if_sml=1

The URL is missing a slash.