strues / retinajs

JavaScript, SCSS, Sass, Less, and Stylus helpers for rendering high-resolution image variants
http://retinajs.com
MIT License
4.42k stars 610 forks source link

Version 2.1.0 does not identify images #253

Closed magcrider closed 7 years ago

magcrider commented 8 years ago

I used to work with previous versions of retina display (v1.3), I just had to install the script and run it, every image was detected and the scripts tried to find the @2x version to replace it.

Now I am creating a new website and after loading the script, nothing happens. well reading carefully I found now the user has to add a data-rjs="3" to be able to handle the retina image but after doing it as in the examples shown it doesn't work for me.

I had to go back to v1.3 to finish my project, but I want to know if there is something wrong with the procedure, maybe something is not clear enough for me, or if maybe there is a kind of jQuery conflict.

chrisgrande commented 8 years ago

Same issue, couldn't get 2.1.0 to work at all. Went back to version 1.5.

strues commented 8 years ago

There is not a dependency on jQuery in order to use Retinajs. Include the script either in your footer or bundled with your other assets. Mark your images that you want Retinajs to swap out with data-rjs=2 or data-rjs=3 and go. This is assuming you're using the standard @2x or @3x suffixes on your images.

ie img src="assets/image.png" data-rjs="2"> and if you have an image in /assets/image@2x.png retinajs will swap it.

DevFountain commented 8 years ago

I came across retinajs this morning and gave v2.1.0 a try. Like @chrisgrande and @whgandalf, I couldn't get it to work. I then tried v2.0.0 and it worked.

sjaakbanaan commented 8 years ago

Same here, v2.1.0 did not work with the rjs=2 method, but v2.0.0 did. Thanks @DevFountain .

hakanw commented 8 years ago

+1

adojck commented 8 years ago

Same problem with 2.1.0. Had to switch to 2.0.0

samcambridge commented 8 years ago

I also had to downgrade to 2.0.0 for it to work.

geckoseo commented 7 years ago

Same. 2.0.0 works but not 2.1.0

In case the additional information is useful, I am building a site Wordpress, and was using the "traditional" method of including the script.

danmurf commented 7 years ago

I was having trouble with 2.1.0 (after switching from 1.*), but managed to get it working by:

Hope this helps :)