Search code examples
cloudinarycontentful

Contentful use Cloudinary images within Rich text for blog post


I have a blog built with NextJs, and I currently use a Rich Text type for my blog post, which at the moment uses the default 'Insert Media' option within Contentful, however I would like to switch this up to Cloudinary.
I have followed the Contentful guide but that does not allow me to use the images within the Rich Text, they are just their own field within the Content Model.

Is there a way I can upload these images to Cloudinary and then use them within my Rich text, in a similar way to 'Insert media'?


Solution

  • Contentful DevRel here 👋🏼

    I would suggest creating a separate content type, such as cloudinaryAsset where you have a field for your Cloudinary image URL, title, description etc.

    You can insert this as a linked entry in your Rich Text field and do what you need with the cloudinaryAsset content type in your Rich Text Renderer on the front end.