strata / frontend

The front of Headless CMS. Build an efficient front-end website taking content from multiple data sources.
MIT License
13 stars 5 forks source link

Expand image content field to include more data #56

Open simonrjones opened 4 years ago

simonrjones commented 4 years ago

As a developer I want to be able to access image width and height dimensions and alt text, if set.

Currently image field works as so:

{{ image.byName('medium') }}

Outputs image URL.

Ideally we need to access other data, e.g.

{{ image.byName('medium').url }} {{ image.byName('medium').width }} {{ image.byName('medium').height }} {{ image.byName('medium').alt }}

We could default to return URL via the default function:

{{ image.byName('medium') }}