A high-resolution image is loaded when the retina_image_tag is called from a retina display
more info about the problem: http://theindustry.cc/2012/03/30/2x-the-retina-dilemma/
exampleapp: http://retinaimagetag-demoapp.herokuapp.com/
exampleapp sourcecode: https://github.com/ffaerber/retina_image_tag_demoapp
Add this line to your application's Gemfile:
gem 'retina_image_tag'
add this line to application.js:
$ //= require retina_image_tag
And then execute:
$ bundle
create a normal image: foo.jpg (400x400px)
and a @2x Retina Images: foo@2x.jpg (800x800px)
and use it like normal
<%= retina_image_tag 'foo.jpg', :size => "400x400" %>
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request