I don't think that there is a way to get that information without some extra clues. You could write a custom binding handler to store the information with the DOM node.
For example, it might look like:
ko.bindingHandlers.domData = {
init: function(element, valueAccessor) {
$(element).data("ko_data", valueAccessor());
}
};
You would use it like:
<button id='btn1' data-bind='text: image, domData: image' />
Then, you would retrieve it like:
var myData = $("#btn1").data("ko_data");
If you are not using jQuery, then you could use Knockout's own DOM data utilities like:
ko.utils.domData.set(element,"ko_data", valueAccessor());
and
ko.utils.domData.get($("#name1")[0], "ko_data")
You could certainly use a different key than "ko_data" or even pass it in on the binding ( domData: { myKey: image } ).
If you wanted to write a wrapper binding, just to make the syntax a little cleaner in the binding, then you could write one like (call it whatever you like):
ko.bindingHandlers.textPlusData = {
init: function(element, valueAccessor) {
$(element).data("ko_data", valueAccessor());
},
update: ko.bindingHandlers.text.update
};
Then, you could just use it like:
<button id='btn1' data-bind='textPlusData: image' />