Skip to content
Discussion options

You must be logged in to vote

Hey @remihuigen

Few months late but dug into the source and the Cloudinary docs to figure out exactly what's happening. Looking at the Cloudinary provider source, the modifier pipeline works like this:

  1. CloudinaryModifiers is the type interface; so and duration aren't in it, hence your TS error.
  2. operationsGenerator has a keyMap that converts modifier names to Cloudinary URL params; so isn't in there either, so even if you bypass the types, it never reaches the generated URL.

So you need to solve both: make TypeScript accept the modifiers and make them actually reach the URL.

Option 1: Module augmentation + keyMap extension; Extend the types so TS is happy:

// types/nuxt-image-cloudinary.…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@remihuigen
Comment options

@mosioc
Comment options

Answer selected by remihuigen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants