Skip to content

Ability to pass in Cloudinary configuration at the module level #195

Closed

Description

@colbyfayock

Is your feature request related to a problem? Please describe.

The underlaying URL gen library accepts a config property which allows people to set up things like custom cnames along with other more advanced configurations.

The CldImage component accepts a config property, but ideally, this is something that can be configurable at the module leve.

Describe the solution you'd like

A few options for how to handle this, but thinking along the lines of:

export default {
  cloudinary: {
    cloud: {
      ...myCloudOptions
    },
    url: {
      ...myUrlOptions
    }
  }
}

https://github.com/cloudinary/js-url-gen/blob/master/src/config/interfaces/Config/ICloudinaryAssetConfigurations.ts

Currently cloudName is accepted as a top level prop, which i dont think makes sense to change, but we can pass along the cloud and url properties into the configuration options.

Describe alternatives you've considered

export default {
  cloudinary: {
    config: {
        cloud: {
          ...myCloudOptions
        },
        url: {
          ...myUrlOptions
        }
    }
  }
}

Felt having the top level config property was unnecessary

Activity

  1. added
    enhancement
    on Mar 22, 2024
  2. added a commit that references this issue on Mar 23, 2024
  3. linked a pull request that will close this issueChore/3.0.0 #198on Mar 23, 2024
  4. linked a pull request that will close this issuechore/2.7.0 #200on Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions