Displaying Base64binary encoded images

Controller: require 'base64' @image_data = "R0lGODlhDwAPAKECAAAAzMzM///// wAAACwAAAAADwAPAAACIISPeQHsrZ5ModrLlN48CXF8m2iQ3YmmKqVlRtW4MLwWACH +H09wdGltaXplZCBieSBVbGVhZCBTbWFydFNhdmVyIQAAOw==" # This is Base64 encoded @image_data_decoded = decode64(@image_data)

View: <img src="<%=@image_data_decoded%>">

You can't just sling binary data into the html like that. If you look
at what the web page you mentionned is doing, what it does is rewrite
the img tags so that they point at some action on your server. that
action then serves up the decoded image (in rails you would use