Image is not showing on browser after hitting the image url

avijit143avijit143 Posts: 1Member
edited March 2018 in Development
Hi LightSpeed,
I am not getting the base64 format of an image after hitting the image url. I have hit that particular url "https://east22.merchantos.com/API/Account/12XXX7/Image" and I have got the following response:

<?xml version="1.0"?> <Images count="2" offset="0" limit="100"> <Image> <imageID>1</imageID> <description/> <filename>download.jpg</filename> <ordering>1</ordering> <publicID>zbnerqd467yulstsjkfm</publicID> <baseImageURL>https://res.cloudinary.com/lightspeed-retail/image/upload/</baseImageURL> <size>5041</size> <createTime>2018-03-09T06:42:44+00:00</createTime> <timeStamp>2018-03-09T09:27:41+00:00</timeStamp> <itemID>486</itemID> <itemMatrixID>0</itemMatrixID> </Image> <Image> <imageID>2</imageID> <description/> <filename>download1.jpg</filename> <ordering>0</ordering> <publicID>zpfwnbgejbmiewchxibs</publicID> <baseImageURL>https://res.cloudinary.com/lightspeed-retail/image/upload/</baseImageURL> <size>6795</size> <createTime>2018-03-09T09:27:25+00:00</createTime> <timeStamp>2018-03-09T09:27:41+00:00</timeStamp> <itemID>486</itemID> <itemMatrixID>0</itemMatrixID> </Image> </Images>
Then, I have taken the value of "baseImageURL" and hit on browser. But, I am getting the image. I want the base64 format of that image. Please help me out on urgent basis.

Thanks in advance
Avijit
Post edited by Michael Carey on

1 comment

  • jamesratcliffejamesratcliffe Posts: 160Administrator, Lightspeed Staff moderator
    Hi Avijit,

    You can only get the image as content-type 'image/jpeg'. If you need a base64 version, you'll need to encode it yourself.
    James Ratcliffe
    Lightspeed HQ
Sign In or Register to comment.