# Addition metadata fields in gallery image

**URL:** <https://discourse.getcockpit.com/t/addition-metadata-fields-in-gallery-image/1102>\
**Category:** Uncategorized\
**Created:** [November 27, 2019, 4:47am UTC](https://discourse.getcockpit.com/t/addition-metadata-fields-in-gallery-image/1102 "2019-11-27T04:47:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![MMCG](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/mmcg/32/446_2.png) [@MMCG](https://discourse.getcockpit.com/u/MMCG)\
**Post date:** [November 27, 2019, 4:47am UTC](https://discourse.getcockpit.com/t/addition-metadata-fields-in-gallery-image/1102/1 "2019-11-27T04:47:15Z")

</div>

Hi,

I would like to add additional custom metadata fields to gallery images. Currently it appears that only “Title” is supported and I would like to add more. E.g. Description, orientation etc…

---

<div class="post-metadata">

**Author:** ![raffaelj](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/raffaelj/32/331_2.png) [@raffaelj](https://discourse.getcockpit.com/u/raffaelj)\
**Post date:** [November 27, 2019, 10:17pm UTC](https://discourse.getcockpit.com/t/addition-metadata-fields-in-gallery-image/1102/2 "2019-11-27T22:17:54Z")

</div>

Do you mean global available asset metadata? Then:

Copy the file `cp-assets.tag` ([source](https://github.com/agentejo/cockpit/blob/next/modules/Cockpit/assets/components/cp-assets.tag)) into `/config/tags` and modfiy it.

If you copy and paste some sample code:

> <https://github.com/agentejo/cockpit/blob/next/modules/Cockpit/assets/components/cp-assets.tag#L641-L649>

you can add your custom fields.

```auto
<div class="uk-form-row">
    <label class="uk-text-small uk-text-bold">{ App.i18n.get('Orientation') }</label>
    <input class="uk-width-1-1" type="text" bind="asset.orientation">
</div>

```

Elseif you want to add a more meta data to the gallery field, you can add more meta fields in the field options:

```json
{
    "meta": {
        "title": {
            "type": "text",
            "label": "Title"
        },
        "title": {
            "orientation": "text",
            "label": "Orientation"
        }
    }
}

```

---

<div class="post-metadata">

**Author:** ![MMCG](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/mmcg/32/446_2.png) [@MMCG](https://discourse.getcockpit.com/u/MMCG)\
**Post date:** [November 28, 2019, 4:12am UTC](https://discourse.getcockpit.com/t/addition-metadata-fields-in-gallery-image/1102/3 "2019-11-28T04:12:53Z")

</div>

Thanks for the info. Where do I update the meta fields?

---

<div class="post-metadata">

**Author:** ![raffaelj](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/raffaelj/32/331_2.png) [@raffaelj](https://discourse.getcockpit.com/u/raffaelj)\
**Post date:** [November 28, 2019, 6:17pm UTC](https://discourse.getcockpit.com/t/addition-metadata-fields-in-gallery-image/1102/4 "2019-11-28T18:17:21Z")

</div>

Add the meta field definitions to the options of your gallery field:

![gallery_meta_01](https://canada1.discourse-cdn.com/flex030/uploads/getcockpit/original/1X/6be90c7a9123d340d33fb0c9afc23089769c6499.png)

When you edit an entry, hover over the gallery image

![gallery_meta_02](https://canada1.discourse-cdn.com/flex030/uploads/getcockpit/original/1X/ff42af36b1c4b83fe6a3724f4d753acc3947fa0d.png)

and click on the gear icon

 ![gallery_meta_03](https://canada1.discourse-cdn.com/flex030/uploads/getcockpit/original/1X/3690abf12ec54c93a5b27b8c6af3f1fc27b1ca5a.png)

---

<div class="post-metadata">

**Author:** ![MMCG](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/mmcg/32/446_2.png) [@MMCG](https://discourse.getcockpit.com/u/MMCG)\
**Post date:** [November 29, 2019, 3:55am UTC](https://discourse.getcockpit.com/t/addition-metadata-fields-in-gallery-image/1102/5 "2019-11-29T03:55:57Z")

</div>

Great, thank you for your help!
