Changing output path of sprite image

Skip to first unread message

Brian Morton

Oct 11, 2011, 5:00:39 PM10/11/11
to SmartSprites CSS Sprite Generator Users and Developers
This tool is absolutely tremendous and it is exactly what I have been
searching for. One small problem I have is that my site is laid out
as follows:

/home/website/public => /
/home/website/public/css => /css
/home/website/public/images => /images

With a build command like this:
sh --root-dir-path ~/website/public/

or even like this:

sh --root-dir-path ~/website/public/ --output-dir-
path /tmp/ --document-root-dir-path ~/website/public/

My sprites wind up at:


Is there any way to control the img part of the path/URL? The path
isn't so bad, but the URL in the resulting sprite.css files is a
problem since my images don't reside at /img. I've hunted through the
source code but cannot find anything useful to resolve this problem.


Stanislaw Osinski

Oct 12, 2011, 1:57:07 AM10/12/11
Hi Brian,

The paths in sprite definition directive are relative to the CSS they're declared in, so if you go:

/** sprite: mysprite; sprite-image: url('../images/mysprite.png'); sprite-layout: vertical */

then the images should end up in your images/ dir. With that change, SmartSprites yout invocation can be something like:

./ --root-dir-path ~/website/public/

Let me know if this did the trick.



You received this message because you are subscribed to the Google Groups "SmartSprites CSS Sprite Generator Users and Developers" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Brian Morton

Oct 31, 2011, 11:48:08 AM10/31/11
to SmartSprites CSS Sprite Generator Users and Developers

That was very helpful. Thanks so much.

On Oct 12, 1:57 am, Stanislaw Osinski
Reply all
Reply to author
0 new messages