Assets

Images can be uploaded from the asset view, or directly from an asset field that is used in your content model.

Under the hood, an asset is just another content model but also supports special methods and utilities for developers. For users, images are also commonly handled differently with their own unique workflow such as gathering permissions, managing edits and optimizing variations for different platforms.

The Window

The Asset View has two models, the Grid View and the Table View. The latter is helpful for seeing the custom fields on your asset model.

Asset Grid View
Asset Table View

From both views you can upload a file from various service providers.

They are:

  • My Device (Your current device)

  • Link (URL)

  • Web Search

  • Facebook

  • Instagram

  • Google Drive

  • Dropbox

CMI window for uploading an asset.

These assets will be available both in other models and to query on their own for ultimate gallery action.

You have three options for editing an image:

Crop

Circle Crop

Rotate

Asset edit window for crop.

Asset edit window for circle crop.

Asset edit window for rotate.

Those with developer access and are comfortable writing queries have a wide array of methods available to manipulate images for common patterns in modern web design. You can read more about that at the developer docs for assets.

Extending the Asset Model

In GraphCMS you have the ability to add custom fields to your asset model. The next clip will show you how you can archive that:

Extending the Asset Model with a Text Field

For it to work you need to toggle "Show System Models" in the Schema view by clicking the settings wheel at the top (see previous clip). Afterwards you can simply drag fields onto the model as you would with normal models.