External references with Cloudinary

Overview

Contentful now supports the External references feature out-of-the-box for Cloudinary which allows you to receive the latest information for assets on delivery through the GraphQL API.

Previously, the Cloudinary app on our marketplace kept a copy of the media information and URLs. With External references, we now fetch the live information from Cloudinary (You have the choice to use either).

Enable External references for Cloudinary 

To enable External references for Cloudinary:

  1. Log in to the Contentful web app.

  2. Install the Cloudinary app in the Contentful web app. 

  3. Configure the credentials needed inside the Contentful Cloudinary App configuration screen. For more information on how to set up the credentials, see step 1 of the Cloudinary page. 

  4. Navigate to the “Content model” tab and select the content type you want to use with the Cloudinary App (and retrieve data from with External references).

  5. Click +Add field and add a new field of type “{} JSON object”.

  6. In the "Appearance" section, under "Choose how this field should be displayed", select Cloudinary App

  7. Select the Resolve content on delivery check box.

  8. Click Confirm.

  9. Save your changes.

Query Contentful with External references

To query Cloudinary data in Contentful using the API:

  1. Open your preferred GraphQL client or use an online IDE. You can also use our GraphQL Playground app.

  2. Insert the following GraphQL query as an example:

    markdown
    {
      query {
        contentTypeName(id: "ENTRY_ID") {
          title
          asset_data {
            id
            publicId
            secureUrl
          }
        }
      }
    }
    

  3. Run the query.

For more information on adjusting your GraphQL API queries and possible errors, see the technical External references and GraphQL API documentation.

Updated Asset Card

We've also refreshed the asset cards displayed after selecting files. We've added more information so that editors and creators alike are able to make sure they've got the right asset selected.

Updated Cloudinary Asset Preview

Was this helpful?
add-circle arrow-right remove style-two-pin-marker subtract-circle remove