Skip to main content

Retrieve image information using Info Request

If you need to retrieve some information about images stored on the FSI server, such as dimensions, size or colour profile for external use, this tutorial will show you what information you can request and how to do it.

Normal image request

For this example, we will use the following image to explain how info requests work.

Normal Image Request Result

The normal request for this image is as follows:

http://localhost/fsi/server?type=image&source=images/samples/shoe-spin/Spin050-2.jpg&width=500

Simple Info Request

To retrieve simple information such as image path, dimensions, last modified date, etc. in JSON format, you can use the standard info request type=info&tpl=info.json. To use this, you need to replace ?type=image in the image request with ?type=info&tpl=info.json:

http://localhost/fsi/server?type=info&tpl=info.json&source=images/samples/shoe-spin/Spin050-2.jpg&width=500

The response to this request will include the following information:

{
"src": "images/samples/shoe-spin/Spin050-2.jpg",
"width": "5184",
"height": "3456",
"size": "2053534",
"alpha": "false",

"levels": [
{"width": "5184", "height": "3456", "tileWidth": "384", "tileHeight": "384"},
{"width": "2592", "height": "1728", "tileWidth": "384", "tileHeight": "384"},
{"width": "1296", "height": "864", "tileWidth": "384", "tileHeight": "384"},
{"width": "648", "height": "432", "tileWidth": "384", "tileHeight": "384"},
{"width": "324", "height": "216", "tileWidth": "384", "tileHeight": "384"},
{"width": "162", "height": "108", "tileWidth": "384", "tileHeight": "384"},
{"width": "81", "height": "54", "tileWidth": "384", "tileHeight": "384"},
{"width": "41", "height": "27", "tileWidth": "384", "tileHeight": "384"}
],
"importstatus": "1",
"lastmodified": "1440074322000",
"_": 1
}

Advanced Info Request

It is also possible to retrieve more advanced information with the request ?type=info&tpl=interface_metadata.json. This request retrieves the data which is displayed in the Metadata tab of your Web Interface in JSON. This is a Web Interface request, that means it is only possible to request this info if you are authenticated while being logged into your FSI Server Web Interface.

A request for the info list looks like this:

http://localhost/fsi/server?type=info&tpl=interface_metadata.json&source=images/samples/shoe-spin/Spin050-2.jpg&width=500

This request also contains advanced information, including IPTC and EXIF data.

Please note that the request only includes information that is stored in the metadata, so if there is no EXIF data, it will not be listed in the info request.

An example of what such a request might look like (abbreviated example):

{
"general": {
"width": "5184",
"height": "3456",
"size": "2053534",
"alpha": "false",
"importstatus": "1",
"importtimestamp": "1526647171593",
"levels": "8",
"lastmodified": "1440074322000",
"src": "images/samples/shoe-spin/Spin050-2.jpg"
},
"iptc": {
"Date Created": "2014-03-03",
"Time Created": "16:26:42 +0100"
},
"exif": {
"Exposure time": "1/30 sec",
"F number": "f/4.0",
"ISO speed rating": "320 ",
"White balance": "Manual white balance",
"Focal length in mm": "53.0",
"Pixels (width) per focal unit": "5184000/907",
"Pixels (height) per focal unit": "3456000/595",
"Unit for focal plane resolution": "Inch",
"Color space information": "sRGB",
"Exif Image Width": "5184",
"Exif version": "0230"
},
"xmp": {},
"fsi": {}
}