• Resolved dantabun

    (@zhiwan)


    Hey,

    This is a great plugin. However, I was wondering how I might get this working with an nginx server using server side mode? It works client side, but it would be great if I could get it working on the sever side. Thanks for all the work.

    -Chris

    http://ww.wp.xz.cn/extend/plugins/wp-retina-2x/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jordy Meow

    (@tigroumeow)

    Hey Zhiwan,

    The server-side requires a rewrite rule. I never used nginx, but it could be something like this:

    rewrite ^/(.+.(?:jpe?g|gif|png)) /wp-content/plugins/wp-retina-2x/wr2x_image.php last;

    I cannot test it, so let me know when you find a solution, and I will add it to the FAQ.

    You know that there is the HTML Rewrite mode as well, right? This one might work better for you 🙂

    Thread Starter dantabun

    (@zhiwan)

    I will fiddle around with the rewrite rule and let you know.

    Could you elaborate on the HTML Rewrite mode? What exactly does it do in comparison to the client/server mode?

    Plugin Author Jordy Meow

    (@tigroumeow)

    It rewrites the HTML before sending it to the client, it replaces the images by retina images if required (and available). The best method 🙂

    Thread Starter dantabun

    (@zhiwan)

    So I switched to the HTML Rewrite. I can serve the retina images under test mode, but when switched off, the images stopped serving retina on my iPhone 5. It makes me think there’s a media query or function that isn’t properly detecting retina display. Do you have any ideas?

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘nginx support for server side’ is closed to new replies.