<IMG CLASS=icon SRC=\ref[icon] ICONSTATE='[icon_state]'>
<IMG SRC=[icon] ICONSTATE='[icon_state]'>
var/image/I = image(icon,src)
usr << browse_rsc(I)
var/html = "<IMG SRC=[I]>"
gives a bad resource error on the browse_rsc() line, and predictably gives a broken image link in the browser if the browse_rsc() line is removed.
var/icon/I = new(icon,icon_state)
usr << browse_rsc(I)
var/html = "<IMG SRC=[I]>"
also produces a broken image link.
(Yes, usr is used properly in the above snippets. The original snippet displayed icons in their default icon_state.)
It's not tested, just a guess, worth a try =P