--- title: 'Liquid objects: model' description: A 3D model uploaded as product media. api_name: liquid source_url: html: 'https://shopify.dev/docs/api/liquid/objects/model' md: 'https://shopify.dev/docs/api/liquid/objects/model.md' --- # model A 3D model uploaded as product media. *** Tip Use the [`model_viewer_tag` filter](https://shopify.dev/docs/api/liquid/filters/model_viewer_tag) to output a [Google model viewer component](https://modelviewer.dev) for the model. *** ## Properties * * alt [string](https://shopify.dev/docs/api/liquid/basics#string) * The alt text of the model. * id [number](https://shopify.dev/docs/api/liquid/basics#number) * The ID of the model. * media\_​type [string](https://shopify.dev/docs/api/liquid/basics#string) * The media type of the model. Always returns `model`. ![](https://shopify.dev/images/icons/32/lightbulbscroll.png)![](https://shopify.dev/images/icons/32/lightbulbscroll-dark.png)ExampleFilter for media of a specific type You can use the `media_type` property with the [`where` filter](https://shopify.dev/docs/api/liquid/filters/where) to filter the [`product.media` array](https://shopify.dev/docs/api/liquid/objects/product#product-media) for all media of a desired type. ```liquid {% assign models = product.media | where: 'media_type', 'model' %} {% for model in models %} {{- model | model_viewer_tag }} {% endfor %} ``` ##### Code ``` {% assign models = product.media | where: 'media_type', 'model' %} {% for model in models %} {{- model | model_viewer_tag }} {% endfor %} ``` ##### Data ``` { "product": { "media": [ { "media_type": "model" } ] } } ``` ## Output ```html ``` * position [number](https://shopify.dev/docs/api/liquid/basics#number) * The position of the model in the [`product.media`](https://shopify.dev/docs/api/liquid/objects/product#product-media) array. * preview\_​image [image](https://shopify.dev/docs/api/liquid/objects/image) * A preview image for the model. * sources array of [model\_source](https://shopify.dev/docs/api/liquid/objects/model_source) * The source files for the model. ```json { "alt": "Potion bottle", "id": 22064203137089, "media_type": "model", "position": 1, "preview_image": {}, "sources": [] } ``` ##### Example ``` { "alt": "Potion bottle", "id": 22064203137089, "media_type": "model", "position": 1, "preview_image": {}, "sources": [] } ```