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

URL generation and file upload components should be available globally on the app level #13

Closed
imagekitio opened this issue Sep 17, 2020 · 0 comments · Fixed by #15
Closed
Labels
enhancement New feature or request

Comments

@imagekitio
Copy link
Contributor

Right now, in order to use IKImage component, you will have to pass it selectively along with required parameters like this
;

export default {
  name: "app",
  components: {
    IKImage,
    IKContext,
    IKUpload
  },
  data() {
    return {
      urlEndpoint: "https://ik.imagekit.io/your_imagekit_id",
      publicKey: "your_public_api_key",
      authenticationEndpoint: "http://www.yourserver.com/auth"
    };
  },
};

Ideally, there should be an option to declare it once like this:

import ImageKit from "imagekitio-vue";
Vue.use(ImageKit, {
  urlEndpoint: "https://ik.imagekit.io/your_imagekit_id",
  publicKey: "your_public_api_key",
  authenticationEndpoint: "http://www.yourserver.com/auth"
});

and then use it globally as

<IKImage path="/default-image.jpg"></<IKImage>

or

<ik-image path="/default-image.jpg"></<ik-image>
@imagekitio imagekitio added the enhancement New feature or request label Sep 17, 2020
@imagekitio imagekitio linked a pull request Sep 24, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant