Manual:Image table

The image table describes images>Special:MyLanguage/Help:Images|images and other uploaded files.

However, the image description pages are stored like other pages.

See also: imageadmin>Special:MyLanguage/Manual:Image Administration|Image Administration.

Many of the fields in this table are analogous to those in the oldimage>Special:MyLanguage/Manual:Oldimage table|oldimage table.

Some of this information was adapted from  in the MediaWiki   directory.

The path for the actual image is not stored in this table: see .

img_name
Filename using underscores.

img_size
File size in bytes.

img_width
Image width, in pixels.

img_height
Image height, in pixels.

img_metadata
Serialized PHP array of the file's properties.

if the extractor fail. T155741

img_bits
Bit-depth of GIF/PNG palette-based images (up to 8-bit). Non-palette images (JPEG/PNG/TIFF/SVG) are 0, 8, or 16. All other files default to 0.

img_media_type
Possibilities are: UNKNOWN, BITMAP, DRAWING, AUDIO, VIDEO, MULTIMEDIA, OFFICE, TEXT, EXECUTABLE, ARCHIVE, 3D

img_major_mime
Possibilities are: unknown, application, audio, chemical, image, message, model, multipart, text, video

img_minor_mime
E.g. jpeg, gif, png, svg+xml, tiff, ogg, pdf	vnd.djvu, webm, wav, mpeg, x-flac, midi, x-xcf, sla, webp, etc.

img_description
Description field given during upload. It's not the description page (associated File: wiki page), but the "summary" provided by the user in case of reupload.


 *  of the image_comment_temp table and the comment table should be used instead!

img_description_id
This is a foreign key to comment_id in the comment table.

img_user
userid>Special:MyLanguage/Manual:User table#user_id|User ID of the user who uploaded the file.

While  is being done, and depending on the configuration setting , this field may be empty and the actor performing the edit can be stored in the <tvar|3>img_actor</> field instead.

img_user_text
username>Special:MyLanguage/Manual:User table#user_name</>|User name of the user who uploaded the file.

While <tvar|1></> is being done, and depending on the configuration setting <tvar|2></>, this field may be empty and the actor performing the edit can be stored in the <tvar|3>img_actor</> field instead.

img_actor
This is a foreign key to <tvar|1></> in the <tvar|2></> table.

img_timestamp
Timestamp of when upload took place. Not necessarily the same timestamp as.

img_sha1
The sha1>Special:MyLanguage/SHA-1</>|SHA-1 hash of the file contents in base 36 format. <tvar|1> </> is used to convert from base 16 (hexadecimal) to base 36 and then pad the result to 31 characters.

Schema summary
<pre style="overflow-x: scroll; white-space: pre;"> ++-+--+-+-+---+ ++-+--+-+-+---+ ++-+--+-+-+---+
 * Field             | Type                                                                                                        | Null | Key | Default | Extra |
 * img_name          | varbinary(255)                                                                                              | NO   | PRI |         |       |
 * img_size          | int(10) unsigned                                                                                            | NO   | MUL | 0       |       |
 * img_width         | int(11)                                                                                                     | NO   |     | 0       |       |
 * img_height        | int(11)                                                                                                     | NO   |     | 0       |       |
 * img_metadata      | mediumblob                                                                                                  | NO   |     | NULL    |       |
 * img_bits          | int(11)                                                                                                     | NO   |     | 0       |       |
 * img_media_type    | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE','3D') | YES  | MUL | NULL    |       |
 * img_major_mime    | enum('unknown','application','audio','image','text','video','message','model','multipart','chemical')       | NO   |     | unknown |       |
 * img_minor_mime    | varbinary(100)                                                                                              | NO   |     | unknown |       |
 * img_description_id | bigint(20) unsigned                                                                                        | NO   |     | NULL    |       |
 * img_actor         | bigint(20) unsigned                                                                                         | NO   | MUL | NULL    |       |
 * img_timestamp     | varbinary(14)                                                                                               | NO   | MUL |         |       |
 * img_sha1          | varbinary(32)                                                                                               | NO   | MUL |         |       |

<pre style="overflow-x: scroll; white-space: pre;"> ++-+--+-+-+---+ ++-+--+-+-+---+ ++-+--+-+-+---+
 * Field             | Type                                                                                                        | Null | Key | Default | Extra |
 * img_name          | varbinary(255)                                                                                              | NO   | PRI |         |       |
 * img_size          | int(10) unsigned                                                                                            | NO   | MUL | 0       |       |
 * img_width         | int(11)                                                                                                     | NO   |     | 0       |       |
 * img_height        | int(11)                                                                                                     | NO   |     | 0       |       |
 * img_metadata      | mediumblob                                                                                                  | NO   |     | NULL    |       |
 * img_bits          | int(11)                                                                                                     | NO   |     | 0       |       |
 * img_media_type    | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE','3D') | YES  | MUL | NULL    |       |
 * img_major_mime    | enum('unknown','application','audio','image','text','video','message','model','multipart','chemical')       | NO   |     | unknown |       |
 * img_minor_mime    | varbinary(100)                                                                                              | NO   |     | unknown |       |
 * img_description_id | bigint(20) unsigned                                                                                        | NO   |     | NULL    |       |
 * img_user          | int(10) unsigned                                                                                            | NO   | MUL | 0       |       |
 * img_user_text     | varbinary(255)                                                                                              | NO   | MUL |         |       |
 * img_actor         | bigint(20) unsigned                                                                                         | NO   | MUL | 0       |       |
 * img_timestamp     | varbinary(14)                                                                                               | NO   | MUL |         |       |
 * img_sha1          | varbinary(32)                                                                                               | NO   | MUL |         |       |

<pre style="overflow-x: scroll; white-space: pre;"> ++-+--+-+-+---+ ++-+--+-+-+---+ ++-+--+-+-+---+
 * Field             | Type                                                                                                        | Null | Key | Default | Extra |
 * img_name          | varbinary(255)                                                                                              | NO   | PRI |         |       |
 * img_size          | int(10) unsigned                                                                                            | NO   | MUL | 0       |       |
 * img_width         | int(11)                                                                                                     | NO   |     | 0       |       |
 * img_height        | int(11)                                                                                                     | NO   |     | 0       |       |
 * img_metadata      | mediumblob                                                                                                  | NO   |     | NULL    |       |
 * img_bits          | int(11)                                                                                                     | NO   |     | 0       |       |
 * img_media_type    | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE','3D') | YES  | MUL | NULL    |       |
 * img_major_mime    | enum('unknown','application','audio','image','text','video','message','model','multipart','chemical')       | NO   |     | unknown |       |
 * img_minor_mime    | varbinary(100)                                                                                              | NO   |     | unknown |       |
 * img_description   | varbinary(767)                                                                                              | NO   |     |         |       |
 * img_description_id | bigint(20) unsigned                                                                                        | NO   |     | 0       |       |
 * img_user          | int(10) unsigned                                                                                            | NO   | MUL | 0       |       |
 * img_user_text     | varbinary(255)                                                                                              | NO   | MUL |         |       |
 * img_actor         | bigint(20) unsigned                                                                                         | NO   | MUL | 0       |       |
 * img_timestamp     | varbinary(14)                                                                                               | NO   | MUL |         |       |
 * img_sha1          | varbinary(32)                                                                                               | NO   | MUL |         |       |

<pre style="overflow-x: scroll; white-space: pre;"> +-+-+--+-+-+---+ +-+-+--+-+-+---+ +-+-+--+-+-+---+
 * Field          | Type                                                                                                        | Null | Key | Default | Extra |
 * img_name       | varbinary(255)                                                                                              | NO   | PRI |         |       |
 * img_size       | int(10) unsigned                                                                                            | NO   | MUL | 0       |       |
 * img_width      | int(11)                                                                                                     | NO   |     | 0       |       |
 * img_height     | int(11)                                                                                                     | NO   |     | 0       |       |
 * img_metadata   | mediumblob                                                                                                  | NO   |     | NULL    |       |
 * img_bits       | int(11)                                                                                                     | NO   |     | 0       |       |
 * img_media_type | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE','3D') | YES  | MUL | NULL    |       |
 * img_major_mime | enum('unknown','application','audio','image','text','video','message','model','multipart','chemical')       | NO   |     | unknown |       |
 * img_minor_mime | varbinary(100)                                                                                              | NO   |     | unknown |       |
 * img_description | varbinary(767)                                                                                             | NO   |     |         |       |
 * img_user       | int(10) unsigned                                                                                            | NO   | MUL | 0       |       |
 * img_user_text  | varbinary(255)                                                                                              | NO   | MUL | NULL    |       |
 * img_timestamp  | varbinary(14)                                                                                               | NO   | MUL |         |       |
 * img_sha1       | varbinary(32)                                                                                               | NO   | MUL |         |       |

<pre style="overflow-x: scroll; white-space: pre;"> +-++--+-+-+---+ +-++--+-+-+---+ +-++--+-+-+---+
 * Field          | Type                                                                                                   | Null | Key | Default | Extra |
 * img_name       | varbinary(255)                                                                                         | NO   | PRI |         |       |
 * img_size       | int(10) unsigned                                                                                       | NO   | MUL | 0       |       |
 * img_width      | int(11)                                                                                                | NO   |     | 0       |       |
 * img_height     | int(11)                                                                                                | NO   |     | 0       |       |
 * img_metadata   | mediumblob                                                                                             | NO   |     | NULL    |       |
 * img_bits       | int(11)                                                                                                | NO   |     | 0       |       |
 * img_media_type | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE') | YES  | MUL | NULL    |       |
 * img_major_mime | enum('unknown','application','audio','image','text','video','message','model','multipart','chemical')  | NO   |     | unknown |       |
 * img_minor_mime | varbinary(100)                                                                                         | NO   |     | unknown |       |
 * img_description | varbinary(767)                                                                                        | NO   |     | NULL    |       |
 * img_user       | int(10) unsigned                                                                                       | NO   | MUL | 0       |       |
 * img_user_text  | varbinary(255)                                                                                         | NO   | MUL | NULL    |       |
 * img_timestamp  | varbinary(14)                                                                                          | NO   | MUL |         |       |
 * img_sha1       | varbinary(32)                                                                                          | NO   | MUL |         |       |

<pre style="overflow-x: scroll; white-space: pre;"> +-++--+-+-+---+ +-++--+-+-+---+ +-++--+-+-+---+
 * Field          | Type                                                                                                   | Null | Key | Default | Extra |
 * img_name       | varbinary(255)                                                                                         | NO   | PRI | NULL    |       |
 * img_size       | int(8) unsigned                                                                                        | NO   | MUL | 0       |       |
 * img_width      | int(5)                                                                                                 | NO   |     | 0       |       |
 * img_height     | int(5)                                                                                                 | NO   |     | 0       |       |
 * img_metadata   | mediumblob                                                                                             | NO   |     | NULL    |       |
 * img_bits       | int(3)                                                                                                 | NO   |     | 0       |       |
 * img_media_type | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE') | YES  |     | NULL    |       |
 * img_major_mime | enum('unknown','application','audio','image','text','video','message','model','multipart','chemical')  | NO   |     | unknown |       |
 * img_minor_mime | varbinary(100)                                                                                         | NO   |     | unknown |       |
 * img_description | tinyblob                                                                                              | NO   |     | NULL    |       |
 * img_user       | int(5) unsigned                                                                                        | NO   |     | 0       |       |
 * img_user_text  | varchar(255) binary                                                                                    | NO   |     | NULL    |       |
 * img_timestamp  | varbinary(14)                                                                                          | NO   | MUL | NULL    |       |
 * img_sha1       | varbinary(32)                                                                                          | NO   |     | NULL    |       |

<pre style="overflow-x: scroll; white-space: pre;"> +-++--+-+-+---+ +-++--+-+-+---+ +-++--+-+-+---+
 * Field          | Type                                                                                                   | Null | Key | Default | Extra |
 * img_name       | varbinary(255)                                                                                         | NO   | PRI | NULL    |       |
 * img_size       | int(8) unsigned                                                                                        | NO   | MUL | 0       |       |
 * img_width      | int(5)                                                                                                 | NO   |     | 0       |       |
 * img_height     | int(5)                                                                                                 | NO   |     | 0       |       |
 * img_metadata   | mediumblob                                                                                             | NO   |     | NULL    |       |
 * img_bits       | int(3)                                                                                                 | NO   |     | 0       |       |
 * img_media_type | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE') | YES  |     | NULL    |       |
 * img_major_mime | enum('unknown','application','audio','image','text','video','message','model','multipart')             | NO   |     | unknown |       |
 * img_minor_mime | varbinary(100)                                                                                         | NO   |     | unknown |       |
 * img_description | tinyblob                                                                                              | NO   |     | NULL    |       |
 * img_user       | int(5) unsigned                                                                                        | NO   |     | 0       |       |
 * img_user_text  | varchar(255) binary                                                                                    | NO   |     | NULL    |       |
 * img_timestamp  | varbinary(14)                                                                                          | NO   | MUL | NULL    |       |
 * img_sha1       | varbinary(32)                                                                                          | NO   |     | NULL    |       |

<pre style="overflow-x: scroll; white-space: pre;"> +-++--+-+-+---+ +-++--+-+-+---+ +-++--+-+-+---+
 * Field          | Type                                                                                                   | Null | Key | Default | Extra |
 * img_name       | varbinary(255)                                                                                         | NO   | PRI | NULL    |       |
 * img_size       | int(8) unsigned                                                                                        | NO   | MUL | 0       |       |
 * img_width      | int(5)                                                                                                 | NO   |     | 0       |       |
 * img_height     | int(5)                                                                                                 | NO   |     | 0       |       |
 * img_metadata   | mediumblob                                                                                             | NO   |     | NULL    |       |
 * img_bits       | int(3)                                                                                                 | NO   |     | 0       |       |
 * img_media_type | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE') | YES  |     | NULL    |       |
 * img_major_mime | enum('unknown','application','audio','image','text','video','message','model','multipart')             | NO   |     | unknown |       |
 * img_minor_mime | varbinary(32)                                                                                          | NO   |     | unknown |       |
 * img_description | tinyblob                                                                                              | NO   |     | NULL    |       |
 * img_user       | int(5) unsigned                                                                                        | NO   |     | 0       |       |
 * img_user_text  | varchar(255) binary                                                                                    | NO   |     | NULL    |       |
 * img_timestamp  | varbinary(14)                                                                                          | NO   | MUL | NULL    |       |
 * img_sha1       | varbinary(32)                                                                                          | NO   |     | NULL    |       |

<pre style="overflow-x: scroll; white-space: pre;"> +-++--+-+-+---+ +-++--+-+-+---+ +-++--+-+-+---+
 * Field          | Type                                                                                                   | Null | Key | Default | Extra |
 * img_name       | varbinary(255)                                                                                         | NO   | PRI | NULL    |       |
 * img_size       | int(8) unsigned                                                                                        | NO   | MUL | 0       |       |
 * img_width      | int(5)                                                                                                 | NO   |     | 0       |       |
 * img_height     | int(5)                                                                                                 | NO   |     | 0       |       |
 * img_metadata   | mediumblob                                                                                             | NO   |     | NULL    |       |
 * img_bits       | int(3)                                                                                                 | NO   |     | 0       |       |
 * img_media_type | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE') | YES  |     | NULL    |       |
 * img_major_mime | enum('unknown','application','audio','image','text','video','message','model','multipart')             | NO   |     | unknown |       |
 * img_minor_mime | varbinary(32)                                                                                          | NO   |     | unknown |       |
 * img_description | tinyblob                                                                                              | NO   |     | NULL    |       |
 * img_user       | int(5) unsigned                                                                                        | NO   |     | 0       |       |
 * img_user_text  | varchar(255) binary                                                                                    | NO   |     | NULL    |       |
 * img_timestamp  | varbinary(14)                                                                                          | NO   | MUL | NULL    |       |

<pre style="overflow-x: scroll; white-space: pre;"> +-++--+-+-+---+ +-++--+-+-+---+ +-++--+-+-+---+
 * Field          | Type                                                                                                   | Null | Key | Default | Extra |
 * img_name       | varchar(255) binary                                                                                    | NO   | PRI | NULL    |       |
 * img_size       | int(8) unsigned                                                                                        | NO   | MUL | 0       |       |
 * img_width      | int(5)                                                                                                 | NO   |     | 0       |       |
 * img_height     | int(5)                                                                                                 | NO   |     | 0       |       |
 * img_metadata   | mediumblob                                                                                             | NO   |     | NULL    |       |
 * img_bits       | int(3)                                                                                                 | NO   |     | 0       |       |
 * img_media_type | enum('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE') | YES  |     | NULL    |       |
 * img_major_mime | enum('unknown','application','audio','image','text','video','message','model','multipart')             | NO   |     | unknown |       |
 * img_minor_mime | varchar(32) binary                                                                                     | NO   |     | unknown |       |
 * img_description | tinyblob                                                                                              | NO   |     | NULL    |       |
 * img_user       | int(5) unsigned                                                                                        | NO   |     | 0       |       |
 * img_user_text  | varchar(255) binary                                                                                    | NO   |     | NULL    |       |
 * img_timestamp  | char(14) binary                                                                                        | NO   | MUL | NULL    |       |

<pre style="overflow-x: scroll; white-space: pre;"> +-+-+--+-+-+---+ +-+-+--+-+-+---+ +-+-+--+-+-+---+
 * Field          | Type                | Null | Key | Default | Extra |
 * img_name       | varchar(255) binary | NO   | MUL | NULL    |       |
 * img_size       | int(8) unsigned     | NO   | MUL | 0       |       |
 * img_description | tinyblob           | NO   |     | NULL    |       |
 * img_user       | int(5) unsigned     | NO   |     | 0       |       |
 * img_user_text  | varchar(255) binary | NO   |     | NULL    |       |
 * img_timestamp  | char(14) binary     | NO   | MUL | NULL    |       |