The library does not load images hosted on external servers, like Cloudfront.
Please advise, thanks.
@avirambm Yes, this is a technical limitation rather than a bug. The library checks if an image exists with an ajax request, which you can only do on the same domain. See issue #3.
In short, we check if the original image's URL is external and skip it to avoid errors. If you have any ideas for how to handle external (CDN, etc) images, please let me know.
Does it load images that are on a subdomain of the domain. Like (images here)images.example.com and (html here)example.com
CORS support was just added to Amazon S3 http://docs.amazonwebservices.com/AmazonS3/latest/dev/cors.html
same problem with Amazon S3. I thought that was a caching problem. It will be great if it can with the normal image path find the retina one without using domain.
I just found the retinajs library, so am not familiar with its internals. But its currently not an option for me because we host all our static content on S3.
Would love to see external image support - that's the only thing preventing us from using this awesome script.
To re-ask caseyohara's question, would the script work if we make our CDN serve images from a subdomain?
The script should work for subdomains if the changes in this pull request are reverted and a proper document.domain value is set.
Allow subdomains in image paths, see issue imulus/retinajs#40.
Allows serving retina images from cname:d CDNs and S3 instances. The document.domain and/or CORS also needs to be set up.
Has anyone given @nebstrebor's idea a shot?
It seems like a better solution to check for image existence overall, avoiding all the issues with CORS for external sources and in theory reducing the amount of requests to one per image since the check would put the requested image in the browser cache.
Any news on this? I can't get retinajs to work with my Django/S3 server... and all my requests are done HTTPS as well...
See Issue #149 for a request to explicitly add support for properly configured CORS domains.
Has there been any resolution on this? Having the same trouble.
@kieronkeenan There are several solutions available.
I patched the is_external check back in 2012 to accept any subdomain instead of only the current host name, which together with a relaxed document.domain setting (and CORS for S3) solves the problem if you're using a CNAMEd CDN. See mrlundis/retinajs@470383f for details.
Another options seems to be using the data-at2x attribute. See #66 and #124 for details on that.