async function init({ options = {}, handleInsert } = {}) {
  /**
   * Configuration is specific to Cloudinary, while options are specific to this
   * integration.
   */
  const { config: providedConfig = {}, ...integrationOptions } = options;
  const resolvedOptions = { ...defaultOptions, ...integrationOptions };
  const cloudinaryConfig = { ...defaultConfig, ...providedConfig, ...enforcedConfig };
  const cloudinaryBehaviorConfigKeys = ['default_transformations', 'max_files', 'multiple'];
  const cloudinaryBehaviorConfig = pick(cloudinaryConfig, cloudinaryBehaviorConfigKeys);

  await loadScript('https://media-library.cloudinary.com/global/all.js');

  function insertHandler(data) {
    const assets = data.assets.map(asset => getAssetUrl(asset, resolvedOptions));
    handleInsert(providedConfig.multiple || assets.length > 1 ? assets : assets[0]);
  }

  const mediaLibrary = window.cloudinary.createMediaLibrary(cloudinaryConfig, { insertHandler });

  return {
    show: ({ config: instanceConfig = {}, allowMultiple } = {}) => {
      /**
       * Ensure multiple selection is not available if the field is configured
       * to disallow it.
       */
      if (allowMultiple === false) {
        instanceConfig.multiple = false;
      }
      return mediaLibrary.show({ ...cloudinaryBehaviorConfig, ...instanceConfig });
    },
    hide: () => mediaLibrary.hide(),
    enableStandalone: () => true,
  };
}
Retrieve the `https` variant of the image url if the `useSecureUrl` option
is set to `true` (this is the default setting).