Have you tried the following:
$('#theDiv').prepend('<img id="theImg" src="https://stackoverflow.com/questions/941206/theImg.png" />')
Have you tried the following:
$('#theDiv').prepend('<img id="theImg" src="https://stackoverflow.com/questions/941206/theImg.png" />')