How to display image pointed by URL in Rails
Put the URL into an img tag inside the view for the page that should display the image.
<%= link_to image_tag post.image %>
You can also use the action view image_tag
helper:
<%= image_tag 'http://power.itp.ac.cn/~jmyang/funny/fun4.jpg' %>
Alternatively you can just use the regular HTML tags:
ERB:
<img src="http://power.itp.ac.cn/~jmyang/funny/fun4.jpg">
Haml:
%img{ src: "http://power.itp.ac.cn/~jmyang/funny/fun4.jpg" }
Slim:
img src="http://power.itp.ac.cn/~jmyang/funny/fun4.jpg"