Questions tagged [retina.js]

retina.js is an open source script for using high-resolution images to devices with retina displays

38 questions
1
vote
2 answers

Else statement in JavaScript based upon media query / viewport OR 'Retina'-fix

I'm creating a website for a photographer. Sadly, to maintain quality, pictures serving should be equal at least the viewport of the user. Therefor, on Retina devices such as the new Macbook Pros, there should be images of about 1800x2880px. Too…
Sander Schaeffer
  • 2,757
  • 7
  • 28
  • 58
1
vote
2 answers

Retina js sets width and height to 0 for bootstrap tabs

I'm using Retina.js(http://retinajs.com/) on a page with bootstrap tabs. While it loads the correct images for the first tab, the other tabs load the correct images (i.e. 2x) but have height and width set to 0. How can I fix this? Is there something…
user1678031
  • 2,925
  • 2
  • 16
  • 15
1
vote
0 answers

Using retina.js script. Non-retina images do not display at all

I'm trying to use the retina.js script. If I understand correctly, when there is no @2x version of an image, the regular image is supposed to display. This is not what is happening for me, though. The regular version displays for a second and then…
Jon
  • 11
  • 2
0
votes
1 answer

Uncaught ReferenceError: exports is not defined at retina.js:12

I am trying to add retinajs but I am facing this error Uncaught ReferenceError: exports is not defined at retina.js:12 I am trying with js file
UMAIR ALI
  • 1,055
  • 5
  • 14
  • 25
0
votes
1 answer

Automatically serving @2x and @3x images using ImageResizer on MVC

Theme that we are building our websties utilizes Retina.Js on the frontend, which automatically tries to load @2x and @3x images according to users device in such way that; If we are serving our sliders for the desktop using image resizer as…
0
votes
1 answer

retina.js produces 404 errors for every image @2x.png

I am running retina.js in my site, per suggestion that it would benefit me in the long run since more and more people are using retina displays. But apparently, retina.js scans the root for all images and attaches a @2x.png at the end of it. But it…
LOTUSMS
  • 10,317
  • 15
  • 71
  • 140
0
votes
1 answer

Adjust Image Path based on Device Retina Ratio

I'm creating a site for a photographer and I'm creating a gallery at the moment. To save me a lot of code I've automated much, including file name, path, width, lightbox class, etc. In the HTML I simply have to write an with a title and the…
Sander Schaeffer
  • 2,757
  • 7
  • 28
  • 58
0
votes
0 answers

Changing retina.js retina image path

When using images on a site, retina.js automatically looks for an image in the same folder with the same name with the added @2x, and then swaps out if the user has a high-DPI screen. What I am trying to do is to tell retina.js to instead look for…
Simon
  • 103
  • 2
0
votes
1 answer

IOS img are not displaying

For some reason some images in img tag are not displaying on first visit on iPhone/iPad. And they are not displaying randomly. So if you clean caches and refresh page some images will be replaced with question mark. I use retinaJS on site. Can…
Lyubimov Roman
  • 1,269
  • 15
  • 27
0
votes
0 answers

img src provided by javascript - how to?

I already try to google but I had no luck. How can I make retina.js work with image source provided by other javascript file? I'm working in someone else's code where the pictures grid is provided by a javascript file. the thumbs are working with…
Erikoliv
  • 1
  • 1
0
votes
1 answer

Ember.js only execute for rerender

I am trying to use retina.js with Ember and I'm running into a problem. Retina.js will swap out img elements with a @2x version if it exists and only does so once when the page is refreshed. Apparently I can loop through img elements and create a…
Patrick Ng
  • 30
  • 5
0
votes
1 answer

How to stop retina.js if iPhone dected

I've got my jquery slideshows looking sharp with retina displays thanks to retina.js, but I only want retina.js to function for non-iPhone retina devices. (iPads and laptops). So, I just need a bit of code to tell retina/js to not function if an…
ian_6500
  • 358
  • 2
  • 10
  • 21
0
votes
1 answer

Retina Images not being loaded on sencha touch

I've included retina.js in my Sencha Touch application. When watching the network monitor I see retina.js is loaded images are loaded normaly example.jpg no @2x images are loaded example@2x.jpg or even looked for Using chrome to emulate an iphone…
Moak
  • 12,596
  • 27
  • 111
  • 166
0
votes
1 answer

How do you use retina.less?

I am trying to use the retina-1.1.0.less code from retinajs.com. It isn't working because the background images are not showing up at all. Here is the html:
0
votes
1 answer

Set interval for RetinaJS

I already have setInterval for the images changing on my website. My problem is that it is only the first image that is replaced with the retina image. How can I load my retina.js again when the other images is loaded? They are changing every 5…