API:Pageimages
Tools
Actions
General
Print/export
In other projects
Appearance
From mediawiki.org
This page contains changes which are not marked for translation.
This page is currently a draft.
More information and discussion about changes to this draft may be on the discussion page.
|
| This page is part of the MediaWiki Action API documentation. |
| MediaWiki Action API |
|---|
| Basics |
| Authentication |
| Accounts and Users |
| Page Operations |
|
| Search |
| Developer Utilities |
| Tutorials |
| v · d · e |
| MediaWiki version: | ≥ 1.20 |
GET request to get a list of all images in the provided page.
API documentation
[edit]| The following documentation is the output of Special: |
prop=pageimages (pi)
- This module requires read rights.
- Source: PageImages
- License: WTFPL
Returns information about images on the page, such as thumbnail and presence of photos.
Specific parameters:
Other general parameters are available.
- piprop
Which information to return:
- thumbnail
- URL and dimensions of thumbnail image associated with page, if any.
- name
- Image title.
- original
- URL and original dimensions of image associated with page, if any.
- Values (separate with | or alternative): name, original, thumbnail
- Default: thumbnail|name
- pithumbsize
Maximum width in pixels of thumbnail images.
- Type: integer
- Default: 50
- pilimit
Properties of how many pages to return.
- Type: integer or max
- The value must be between 1 and 50.
- Default: 50
- pilicense
Limit page images to a certain license type:
- free
- Only free images.
- any
- Best image, whether free or non-free.
- One of the following values: any, free
- Default: free
- picontinue
When more results are available, use this to continue. More detailed information on how to continue queries can be found on mediawiki.org.
- Type: integer
- pilangcode
Code for the language the image is going to be rendered in if multiple languages are supported
Example:
- Get name and 100-pixel thumbnail of an image on the Albert Einstein page.
- api.php?action=query&prop=pageimages&titles=Albert%20Einstein&pithumbsize=100 [open in sandbox]
Example
[edit]GET request
[edit]
TODO: ApiEx p1...
Response
[edit]
TODO: response....
Sample code
[edit]
TODO: Sample code ....
Hidden category: