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


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: ‘’, 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,