Thread:Extension talk:Widgets/How to pass Mediawiki images into a widget?/reply

I don't think you can have wikitext within widget code, if that's what you're trying to do. Maybe what you can use is a wrapper template around the widget, that takes in a file name and handles calling both the wikitext and the widget...