How to render an <IMG> HTML tag with variable attributes inside a Knockout template?

The attr binding provides a generic way to set the value of any attribute for the associated DOM element.

http://knockoutjs.com/documentation/attr-binding.html

Knockout’s declarative binding system provides a concise and powerful way to link data to the UI.

http://knockoutjs.com/documentation/binding-syntax.html

Example 1

Example 2

Example 3

Example 4

Example 5