Media
Get a list of items in the media library.
Table Specific Information
SELECT
The driver uses the WordPress API to process some of the filters.
- Id supports the '=' comparison.
- PostId supports the '=' comparison.
- Date supports the '=' comparison.
- MimeType supports the '=' comparison.
The driver processes other filters client-side within the driver.
For example, the following queries are processed server side.
SELECT * FROM Media
SELECT * FROM Media WHERE Id=21
Update
To update a media you must specify the following column: Id.
UPDATE Media SET Caption= 'Test Caption', Description = 'Sample media' WHERE ID = 183
Delete
To delete a media you must specify the following column: ID.
DELETE FROM Media WHERE ID = 21
Columns
| Name | Type | ReadOnly | References | Description |
| ID [KEY] | Integer | True |
The unique identifier assigned to the media item within the WordPress site. | |
| Title | String | False |
The title of the media file as displayed in the Media Library or attached post. | |
| PostID | Integer | True |
The unique identifier of the post or page the media item is attached to. Returns 0 if the media is unattached. | |
| Allowdownload | String | False |
Indicates whether the video file is available for download by viewers. | |
| Alt | String | False |
The alternative text for the media item, used for accessibility and Search Engine Optimization (SEO) purposes. | |
| AuthorID | Integer | True |
The unique identifier of the user who uploaded the media item. | |
| Caption | String | False |
A short caption or description displayed with the media item. | |
| Date | Datetime | True |
The upload date and time of the media item, recorded in ISO 8601 format. | |
| Description | String | False |
A longer description or additional information about the media item. | |
| DisplayEmbed | String | False |
Indicates whether the video can be embedded on external sites. | |
| Extension | String | True |
The file extension of the media item, such as jpg, mp4, or pdf. | |
| File | String | True |
The name of the uploaded media file as stored in WordPress. | |
| GUID | String | True |
The globally unique identifier for the media item, often corresponding to the original file URL. | |
| Icon | String | True |
A representative icon indicating the file type of the media item. | |
| Length | Integer | True |
The duration of the video file, measured in seconds. | |
| MetaAggregate | String | True |
Returns aggregated metadata about the media item, including file details and custom fields. | |
| MimeType | String | True |
Specifies the file's Multipurpose Internet Mail Extensions (MIME) type, such as image/jpeg or video/mp4. | |
| Rating | String | False |
Indicates the content rating of the video, such as suitable for all audiences or restricted. | |
| Size | String | True |
The total file size, displayed in a human-readable format such as KB or MB. | |
| URL | String | True |
The direct URL for accessing or downloading the uploaded media file. | |
| VideopressGuid | String | True |
The unique identifier assigned to the video by VideoPress. | |
| IsVideopressProcessingDone | Boolean | True |
Indicates whether VideoPress has finished processing and encoding the uploaded video. | |
| Width | Integer | True |
The width of the video or image in pixels. | |
| Height | Integer | True |
The height of the video or image in pixels. | |
| ThumbnailsAggregate | String | True |
Contains metadata about automatically generated image thumbnails created from the original upload. | |
| ExifAggregate | String | True |
Provides EXIF data and camera details captured when the image was taken, if available |