# Index an image using ingest-attachment via Postman

**URL:** https://discuss.elastic.co/t/index-an-image-using-ingest-attachment-via-postman/157472
**Category:** Elasticsearch
**Created:** [November 20, 2018, 5:56am UTC](https://discuss.elastic.co/t/index-an-image-using-ingest-attachment-via-postman/157472 "2018-11-20T05:56:07Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ottadini](https://avatars.discourse-cdn.com/v4/letter/o/b19c9b/32.png) [@ottadini](https://discuss.elastic.co/u/ottadini)
#### Post date: [November 20, 2018, 5:56am UTC](https://discuss.elastic.co/t/index-an-image-using-ingest-attachment-via-postman/157472/1 "2018-11-20T05:56:07Z")

</div>

I'm trying to test indexing a tiff image using the ingest-attachment plugin.

First, does Elasticsearch's Tika implement parsers for image formats? I realise that they'll only get metadata, but that's all I want for now.

Second, how can I POST an image to ES using Postman? My request is formed like this:  
**URL:**  
`my_server:9200/{{$index}}/{$type}}/{{$docid}}?pipeline=attachment`  
**Headers:**  
Content-Type=application/json  
**Body:**  
?? Do I use 'binary' and upload the image here? Do I then use a pre-request script to convert it to ascii encoded base64?? How would I do that? Or do I do the conversion elsewhere and paste it into a json document?

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [November 20, 2018, 8:25am UTC](https://discuss.elastic.co/t/index-an-image-using-ingest-attachment-via-postman/157472/2 "2018-11-20T08:25:22Z")

</div>

> Do I then use a pre-request script to convert it to ascii encoded base64??

Yes. You need to do that BASE64 transformation on your side and then create a JSON document which contains it.

Alternatively you can use FSCrawler with its [REST API mode](https://fscrawler.readthedocs.io/en/fscrawler-2.5/user/rest.html) and then you can upload a binary file directly like:

```auto
curl -F "file=@myimage.png" "http://127.0.0.1:8080/fscrawler/_upload"

```

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [December 18, 2018, 8:25am UTC](https://discuss.elastic.co/t/index-an-image-using-ingest-attachment-via-postman/157472/3 "2018-12-18T08:25:29Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
