# How to store and retrieve image in IPFS Infura by javascript?

**URL:** <https://discuss.ipfs.tech/t/how-to-store-and-retrieve-image-in-ipfs-infura-by-javascript/3511>\
**Category:** Uncategorized\
**Tags:** js-ipfs\
**Created:** [July 28, 2018, 5:45pm UTC](https://discuss.ipfs.tech/t/how-to-store-and-retrieve-image-in-ipfs-infura-by-javascript/3511 "2018-07-28T17:45:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunflower](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@sunflower](https://discuss.ipfs.tech/u/sunflower)\
**Post date:** [July 28, 2018, 5:45pm UTC](https://discuss.ipfs.tech/t/how-to-store-and-retrieve-image-in-ipfs-infura-by-javascript/3511/1 "2018-07-28T17:45:27Z")

</div>

Hi,

I wish to store and retrieve image files in IPFS INFURA by javascript code.

I have :

const IPFS = require(‘ipfs’)  
const ipfs = new IPFS({ host: ‘[ipfs.infura.io](http://ipfs.infura.io)’, port: 5001, protocol: ‘https’ });

and want to use this “ipfs” object for storing and retrieving image file.Would you please help me with the right javascript code for this?

Thanks in advance,
