# MediaFile
The `MediaFile` component renders the media for the Storefront API's
[Media object](https://shopify.dev/api/storefront/reference/products/media). It renders an `Image`, `Video`, an `ExternalVideo`, or a `ModelViewer` depending on the `__typename` of the `data` prop.
```jsx
import {MediaFile} from '@shopify/hydrogen';
export function ProductsMediaFiles({products}) {
return (
{products.nodes.map((product) => {
return ;
})}
);
}
```
```tsx
import {MediaFile} from '@shopify/hydrogen';
import type {ProductConnection} from '@shopify/hydrogen/storefront-api-types';
export function ProductsMediaFiles({products}: {products: ProductConnection}) {
return (
{products.nodes.map((product) => {
return ;
})}
);
}
```
## Props
MediaFile renders an `Image`, `Video`, `ExternalVideo`, or `ModelViewer` component. Use the `mediaOptions` prop to customize the props sent to each of these components.
### MediaFileProps
### data
value: `PartialObjectDeep | PartialObjectDeep | PartialObjectDeep | PartialObjectDeep