Hi,
You can use Pluggable Widget for it and retrieve the image through the Image property in your XML. Please check Client API documentation to have a full overview about this subject.
https://docs.mendix.com/apidocs-mxsdk/apidocs/property-types-pluggable-widgets#image
https://docs.mendix.com/apidocs-mxsdk/apidocs/client-apis-for-pluggable-widgets