Documentation

Installation

Web

Installing CropGuide is as easy as creating a free CropGuide account and copy pasting the CropGuide script before the closing </head> tag on your website.

When you’re installing CropGuide on a platform like WordPress, or Shopify, you can use one of the installation guides below.

<script>
(function (w, d) {
    w.$cropguide = ['GFFFYQ'];
    var s = d.createElement('script');
    s.async = true;
    s.src = 'https://cdn.cropguide.io/l.js';
    d.head.append(s);
})(window, document);
</script>

When you copy the snippet above you’ll have to replace the pattern 'GFFFYQ' with your personal access key shown on your customer dashboard.

Apps

When you’re building an app and don’t want to add the <script> tag to your app template you can install the @cropguide/browser module instead.

You can then use CropGuide like this.

import CropGuide from '@cropguide/browser';

CropGuide('GFFFYQ', {
    // CropGuide options
    // ...
})
    .then(() => {
        // CropGuide init fired
    })
    .catch((err) => {
        // Something went wrong during client load
    });

Content Security Policy

You’ll need to add the following keywords to your CSP to use CropGuide.

script-src https://cdn.cropguide.io;
connect-src https://app.cropguide.io;
img-src blob:;
worker-src blob:;

Our editor requires the blob: scheme for the img-src and worker-src directives, it uses blob URLs to read image sizes and to run code on separate threads.

Guides

We’ve set up guides for various popular platforms to help you install CropGuide quickly, see below for all available installation guides.

No-Code Tools

JavaScript Libraries

Content Management

Frequently Asked Questions

  • Where do I add the CropGuide script to my website?

    Add the script from your CropGuide dashboard before the closing </head> tag on a page with a file upload field. See the platform-specific installation guides for popular website builders.

  • Do I need to change my existing upload endpoint?

    No. CropGuide returns the processed image to your existing file upload field, and your website uploads it using its normal process.

  • Can I install CropGuide in a JavaScript app without a script tag?

    Yes. Install the @cropguide/browser package and initialize it with the access key from your CropGuide dashboard.