QLPreviewPanel.AddImage
-----------------------

Adds an image to the list of files to preview.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [QuickLook](component_QuickLook.md) | [4.3](newinversion43.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "QLPreviewPanel.AddImage"; Image { ; Title } ) 

**MBS**( **"QLPreviewPanel.AddImage";** /\* Adds an image to the list of files to preview. \*/  
**$Image**; /\* The image as container.e.g. $img \*/   
**$Title**) /\* Optional; The title for the image.e.g. "My Holiday" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| Image | The image as container. | $img |  |
| Title | The title for the image. | "My Holiday" | Optional |

### Result

Returns OK or error.

### Description

Adds an image to the list of files to preview.  
If you have an image file, better use [QLPreviewPanel.AddFile](QLPreviewPanelAddFile.md) function.  
The container can contain an image (GIF, PNG, BMP, JPEG) or an image file (TIFF, BMP, PNG, JPEG and other formats supported by macOS).  
  
Either we use file path from FileMaker's external container storage directly or we write a temporary file, which is cleared later when app quits or panel is cleared.  
### See also

- [QLPreviewPanel.AddFile](QLPreviewPanelAddFile.md)
- [QLPreviewPanel.AddPDF](QLPreviewPanelAddPDF.md)
- [QLPreviewPanel.Clear](QLPreviewPanelClear.md)
- [QLPreviewPanel.Show](QLPreviewPanelShow.md)

### Example Databases

- [Mac only/Icon and QuickLook/QuickLook Preview Panel](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20only/Icon%20and%20QuickLook/QuickLook%20Preview%20Panel.shtml#1ScriptAnchor_)

This function checks for a license.

Created 18th August 2014 , last changed 10th August 2020

  
[QLPreviewPanel.AddFile](QLPreviewPanelAddFile.md) - [QLPreviewPanel.AddPDF](QLPreviewPanelAddPDF.md)

[HTML Version](QLPreviewPanelAddImage.shtml)