On first thought this should be not too difficult to achieve.
I would try something like
getDom: function() {
var wrapper = document.createElement("div");
if (!this.config.imageurl) {
wrapper.innerHTML = "ERROR";
}else{
var pic = document.createElement("img");
if(!this.config.showColor){
pic.className = "bw";
}
pic.src = this.config.imageurl;
wrapper.appendChild(pic);
}
return wrapper;
}
and then use
defaults: {
imageurl: '',
showColor: false
}
where the imageurl should default to the modules public directory if no “http” address is specified.
in the css
.MODULENAME img.bw {
-webkit-filter: grayscale(100%);
}
would allow to convert to grayscale to fit in with the general design.
Hope that gets you started :-)