I have a image here http://power.itp.ac.cn/~jmyang/funny/fun4.jpg and I want to display it in my Rails site. How should i do that?
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"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With