You can definitely do what you're wanting to do. The key point to realize is probably that when using eco, <%=
puts you in 'coffeescript' mode and you can write any coffescript expression you want.
So to do what you want, you'd write this markup:
<img src="<%= @getThumbnail('images/' + @document.icon, '128x128') %>" alt="">