I'm trying to use Stacey CMS in conjunction with retina.js for my small portfolio site. Stacey tells all images inside a project folder to be added to the page. At the same time I'd like to serve @2x
hi-dpi images. If I include these in the same folder, Stacey will add both the regular image.png
and image@2x.png
to the page, which I want to avoid.
To solve this, I want to rewrite all images ending with @2x
to have the root /retina
inside the same project folder. This folder is dynamic, ie. there are many different project folders, so I would like to have one rewrite rule to work for all.
I've gotten to this point with some help from a fellow stack overflow user:
RewriteRule ^(.*)@2x(.*)$ /Retina/$1@2x$2 [L]
This however, does not refer to a subfolder of the original project folder. How do I go about referring to the correct folder?
Edit: Alternatively there may be other ways to solve this issue? Changing retina.js retina image path