Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nuxt Support? #8

Closed
jimmiejackson414-zz opened this issue Jul 15, 2020 · 5 comments
Closed

Nuxt Support? #8

jimmiejackson414-zz opened this issue Jul 15, 2020 · 5 comments

Comments

@jimmiejackson414-zz
Copy link

Hi there, wondering if this has support for Nuxt/SSR?

I am working to move over to ImageKit from Cloudinary, and this is how I added a Cloudinary plugin to SSR support:

import Vue from 'vue';
import Cloudinary, { CldImage, CldTransformation } from 'cloudinary-vue';

Vue.use(Cloudinary, {
  configuration: { cloudName: process.env.CLOUDINARY_NAME },
  components: [ CldImage, CldTransformation ]
})

It would be great if ImageKit offered something similar. Thanks!

@jimmiejackson414-zz
Copy link
Author

Just to follow up because I think it might be related, but trying to use a simple IKImage /> according to the docs returns a ReferenceError: HTMLElement is not defined error:

<template>
    <client-only>
        <IKImage
            :public-key="publicKey"
            :url-endpoint="urlEndpoint"
            :src="imageSrc" /
    </client-only>
</template>

<script>
    import { IKImage } from 'imagekitio-vue';

    export default {
        computed: {
            imageSrc() {
               return this.image.url;    
            },
            publicKey() {
                return process.env.IMAGEKIT_PUBLIC_KEY;
            },
            urlEndpoint() {
                return process.env.IMAGEKIT_URL_ENDPOINT;
            }
        }
    }
</script>

@jimmiejackson414-zz
Copy link
Author

Any updates on this?

@imagekitio
Copy link
Contributor

@jimmiejackson414,
Please test with the latest version i.e. 1.0.5

@jimmiejackson414-zz
Copy link
Author

Looks to be working now, thank you!

@dosstx
Copy link

dosstx commented Aug 23, 2020

This support just sold me . I am moving to imagekit, thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants