If you declare a parameter of the type DataReference<IMediaFile>, you should get a parameter with the widget you need:
Normally, each type of a parameter has its own default widget. Some - like strings - can have widgets other than the default one.
To experiment, you can create an XSLT function and add a parameter. Then change the type of the parameter and check what widget is set by default.
public DataReference<IMediaFile> ImageSource { get; set; }
Please see the example here: http://docs.composite.net/ASP-NET/Razor/Rendering-URLsNormally, each type of a parameter has its own default widget. Some - like strings - can have widgets other than the default one.
To experiment, you can create an XSLT function and add a parameter. Then change the type of the parameter and check what widget is set by default.