Container.GetMimeType
---------------------

Returns the mime type for an image stored in a container field.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Container](component_Container.md) | [15.5](newinversion155.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Container.GetMimeType"; Container ) 

**MBS**( **"Container.GetMimeType";** /\* Returns the mime type for an image stored in a container field. \*/  
**$Container**) /\* The container field or value to inspect. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Container | The container field or value to inspect. |  |

### Result

Returns text or error.

### Description

Returns the mime type for an image stored in a container field.   
This is very useful for displaying images in web pages.  
  
Used internally in [Container.GetDataURL](ContainerGetDataURL.md) function.   
When this returns "application/octet-stream", you could get the file name and use [Text.FileExtensionToMimeType](TextFileExtensionToMimeType.md).  
### Examples

Query mime type for photo container:

 MBS ( "Container.GetMimeType"; Contacts::Photo )  
### See also

- [Container.GetDataURL](ContainerGetDataURL.md)
- [Container.GetType](ContainerGetType.md)
- [Container.GetTypes](ContainerGetTypes.md)
- [Container.GetTypeSize](ContainerGetTypeSize.md)
- [Text.FileExtensionToMimeType](TextFileExtensionToMimeType.md)

### Release notes

- **Version 15.5**
    - Added [Container.GetMimeType](https://www.mbsplugins.eu/ContainerGetMimeType.shtml) function.

### Blog Entries

- [New in MBS FileMaker Plugin 15.5](https://www.mbsplugins.de/archive/2025-11-25/New_in_MBS_FileMaker_Plugin_15/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 15.5pr6](https://www.mbsplugins.de/archive/2025-11-09/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 27th October 2025 , last changed 27th October 2025

  
[Container.GetJPEGWidthResolution](ContainerGetJPEGWidthResolution.md) - [Container.GetName](ContainerGetName.md)

[HTML Version](ContainerGetMimeType.shtml)