 <p>Add image urls</p> <pre><code> { q: "In Monopoly, the green set consists of Pacific Avenue, North Carolina Avenue and which other?", s: ["Oxford Street", "Pennsylvania Avenue", "Park Place", "New York Avenue"] // add umage urls instead of text and, a: "Pennsylvania Avenue", correct: 0 } function radioButtons(ary, qNum) { var answers = []; for (i = 0; i &lt; ary.length; i++) { answers.push('&amp;lt;label&gt;&amp;lt;input type="radio" name="' + qNum + '" value="' + ary[i] + '"&gt;&lt;img src="'+// pass url here//+'"/&gt;' + ary[i] + '&amp;lt;/label&gt;'); } return answers.join(" "); } </code></pre> <p>if you want both url and name then instaed of passing "Oxford Street" </p> <p>you can pass {name:"Oxford Street",url:'some url'}</p> <p>I hope this helps.</p>