• Resolved djdeejay

    (@djdeejay)


    Hi Jordy,

    Heres possibly a new issue.

    We have ajax loaded pages on our site and unfortunately the @2x images are not being loaded instead of the standard ones.

    I couldn’t get client side (retina.js) to work with our CDN yet, although when I turned the CDN off it didn’t work anyway with the ajax loaded pages, I figured I might have had to include the retina.js file to load within the ajax load of the page.

    However I swapped to HTML rewrite as it got around the CORS issues that I couldn’t’ get working with the CDN for Nginx and it started loading the images on the page (I presume the HTML rewrite is better than server side with cloud flare and caching?)

    Have a look at the site, and click on an image to load the portfolio page and see the @2x image doesn’t load (but if you click on the source and edit it to @2x you’ll see its there on the CDN)

    Can you think of an answer for this one?

    https://www.ads-software.com/extend/plugins/wp-retina-2x/

Viewing 1 replies (of 1 total)
  • Thread Starter djdeejay

    (@djdeejay)

    Silly me its in the FAQ! –

    $('img').each(function(){
      new RetinaImage(this);
    });

    Should have looked first, sorry! Works a treat when its in the right place of your JS file.

    Now just getting these things on W3 now I have a method that works to show them – is there any chance you could fork that S3 plugin and hook it into the methods you use? Another plugin in your library and shouldn’t take too long?

Viewing 1 replies (of 1 total)
  • The topic ‘Retina images no loading on Ajax loaded pages.’ is closed to new replies.