Getting Image Information
Updated at:2025-11-03
Overview
BOS allows users to fetch image information using commands. If the image includes EXIF data, the full EXIF information will be returned; otherwise, only the basic image information will be provided.
The returned exif information includes but is not limited to:
- dateTime、dateTimeOriginal、dateTimeDigitized、format、gpsLatitude、gpsLatitudeRef、gpsLongitude、gpsLongitudeRef、imageHeight、imageWidth、imageSize、make、model、orientation、resolutionX、resolutionY、resolutionUnit
Note: EXIF data records attributes and shooting details of digital photos, but not all images contain EXIF information.
Method to obtain image information
You can directly use the EXIF command without parameters to retrieve image information.
Example
- Example of an image containing exif information:
https://doc.bce.baidu.com/bce-documentation/BOS/orient.jpg?exif

Plain Text
1Response example:
2{
3 "dateTime": {
4 "value": "2016-08-31T14:57:07Z"
5 },
6 "dateTimeDigitized": {
7 "value": "2016-08-31T14:57:07Z"
8 },
9 "dateTimeOriginal": {
10 "value": "2016-08-31T14:57:07Z"
11 },
12 "format": {
13 "value": "JPEG"
14 },
15 "gpsLatitude": {
16 "value": "40/1,2/1,3675/100"
17 },
18 "gpsLatitudeRef": {
19 "value": "N"
20 },
21 "gpsLongitude": {
22 "value": "116/1,16/1,257/100"
23 },
24 "gpsLongitudeRef": {
25 "value": "E"
26 },
27 "imageHeight": {
28 "value": "2448"
29 },
30 "imageSize": {
31 "value": "1225883"
32 },
33 "imageWidth": {
34 "value": "3264"
35 },
36 "make": {
37 "value": "Apple"
38 },
39 "model": {
40 "value": "iPhone 6"
41 },
42 "resolutionUnit": {
43 "value": "2"
44 },
45 "resolutionX": {
46 "value": "72/1"
47 },
48 "resolutionY": {
49 "value": "72/1"
50 }
51}
- Example of an image containing no exif information:
https://doc.bce.baidu.com/bce-documentation/BOS/image.jpg?exif

Plain Text
1Response example:
2{
3 "format": {
4 "value": "JPEG"
5 },
6 "imageHeight": {
7 "value": "296"
8 },
9 "imageSize": {
10 "value": "63506"
11 },
12 "imageWidth": {
13 "value": "279"
14 }
15}
