Create selectors for GUID properties in widget designers
While creating a widget designer, if you select a GUID property you must choose the type of the interface which you want to use in your designer. The possible values are: default (text field), page, document, image, and video selector. Each selector type renders in your designer a simple label, which displays the ID of your selected item and a button to open the appropriate selector window. Once you select the desired item and click the Save button of the designer, you item ID will be saved in the corresponding GUID property of the widget.
Once you have the ID of your item, you can check for code samples how to use it to retrieve the actual item and work with it. For more information, see Querying images.