我正在使用Cloudinary构建一个React网站,并且尝试使用 Transformations 时出现问题 .

这是我的JSX:

<Image cloudName={'my-cloud-name'} publicId={'my-image.jpg'}>
  <Transformation width={400} height={300}/>
</Image>

没有 Transformation 标记图像呈现,但在 Transformation 标记中我得到此错误:

Uncaught TypeError: mapped.filter is not a function
at Image.getChildTransformations (CloudinaryComponent.js:74)
at Image.getTransformation (CloudinaryComponent.js:93)
at Image.getUrl (CloudinaryComponent.js:121)
at Image.prepareState (Image.js:93)
at new Image (Image.js:55)
at ReactCompositeComponentWrapper.mountComponent (common.js:10034)
at ReactCompositeComponentWrapper.wrapper [as mountComponent] (common.js:17264)
at Object.mountComponent (common.js:18081) 
at ReactDOMComponent.mountChildren (common.js:16701) 
at ReactDOMComponent._createContentMarkup (common.js:11459)

我没有发现任何其他人通过谷歌搜索来解决这个问题的证据,我尝试了几个不同的例子,但仍然没有运气 .

谢谢!

注意:我正在使用 cloudinary-react@1.0.4