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

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

Closed
colbyfayock opened this issue Mar 22, 2024 · 0 comments · Fixed by #200
Closed

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

colbyfayock opened this issue Mar 22, 2024 · 0 comments · Fixed by #200
Labels
enhancement New feature or request

Comments

@colbyfayock
Copy link
Collaborator

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

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