Even on debug mode its not loading the @2x images, despite them being there if I manually change the URL…
Sorry, I am doing some house-keeping and all for the plugin but I don’t have much time to look into your issue. It would be a lot of debug and time for me since I don’t have the same configuration at all. Can you ask a friend or hire a developer to help you? I will definitely update the plugin if I have the solution a big closer to me.
I am also using the Amazon S3 and CloudFront plugin to handle my images and would love support for this…
It really is a great platform for speed on the cheap… Thanks for all your help and Support 🙂
I had this problem and solved it by patching these lines in wp-retina-2x.php to make it reuse the original host name as modified by the S3 plugin instead of rewriting it to a local URL. I haven’t tested this with other setups and it may break things for you if your settings aren’t the same as mine (I don’t know why the original code looked the way it did)
In wr2x_picture_rewrite, starting on line 143:
$img_urlinfo = parse_url($node->getAttribute( "src" )); //kalleboo
$hostinfo = $img_urlinfo['scheme'].'://'.$img_urlinfo['host'].'/'; //kalleboo
$img_pathinfo = wr2x_get_pathinfo_from_image_src( $node->getAttribute( "src" ) );
$filepath = trailingslashit( ABSPATH ) . $img_pathinfo;
$potential_retina = wr2x_get_retina( $filepath );
if ( $potential_retina != null ) {
$retina_pathinfo = ltrim( str_replace( ABSPATH, "", $potential_retina ), '/' );
$retina_url = trailingslashit( $hostinfo ) . $retina_pathinfo; //kalleboo
$img_url = trailingslashit( $hostinfo ) . $img_pathinfo; //kalleboo
$from = $doc->saveXML($node);
P.S. there’s another gotcha with the S3 plugin: If you turn on filename versioning in S3 settings then it breaks the retina plugin since it can’t find the versioned directories that exist on S3 locally. Might want to put that one in the troubleshooting docs.