# Generic file

The generic_file object can be returned when a metafield has the type file_reference.

The `generic_file` object can be returned when a metafield has the type `file_reference`. If the `file_reference` is not an image of type `JPEG`, `PNG` or `GIF`, a `generic_file` is returned.

When the `media_tag` filter is applied to a generic file, it creates an image tag for the preview image of the file.

## generic_file.id

Returns the ID of the generic file.

## generic_file.media_type

Returns the type of the object (`generic_file`).

## generic_file.preview_image

Returns a [preview image](https://developer.versacommerce.de/articles/liquid-objects-image) for the generic file. This is usually a square icon that represents the file type.

Preview images have no ID attribute.

## generic_file.url

Returns the absolute path of the generic file on the VersaCommerce content delivery network (CDN).

```liquid
{{ product.metafields.namespace.key.value.url }}
```

```text
https://cdn.versacommerce.de/s/files/0/0000/0000/files/manual.pdf?v=13336056399862026299
```
