Attachment Picker Macro

Last modified by Admin on 2024/02/12 00:19

cogDisplay an attachment picker.
Developed by

XWiki Development Team

Active Installs98
0 Votes
LicenseGNU Lesser General Public License 2.1
Bundled With

XWiki Standard



Installable with the Extension Manager


Provides a macro to search and select for an attachment. The results are presented in a grid.

Note: The results are retrieved from the document indexation. Not yet indexed content are not part of the returned search result.

Related widgets:

14.10.1+, 15.0+ It is possible to select the search scope, either the current page only, or all viewable pages.
In addition, a warning is displayed to the user when the selected attachment is not from the current page.



{{attachmentGalleryPicker id="myid"/}}

{{attachmentGalleryPicker filter="image/*"/}}

{{attachmentGalleryPicker limit="5"/}}

## Since 14.10.2/15.0-rc-1
{{attachmentGalleryPicker target="Space.Page"/}}


NameOptionalAllowed valuesDefault valueDescription
idyesvalid syntax idN/AThe id of the rendered attachment picker
filteryesa comma separated list of mimetypesN/AThe mimetypes used to filter the displayed search results
limityesa positive integer20The number of results displayed to the user
14.10.2+, 15.0+ targetyesA document referenceN/AThe document reference to use as the current page

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager).

You can also use the manual method which involves dropping the JAR file and all its dependencies into the WEB-INF/lib folder and restarting XWiki.


Dependencies for this extension (org.xwiki.platform:xwiki-platform-attachment-picker-macro 16.0.0):


Get Connected