We use Compass to Sprite images (combine many images into a single file). If I create a Sprite for the images/common/ dir, Compass creates a file named common-sff832da50b.png. Compass generates a new suffix each time it regenerates the Sprite. If I leave these Sprite images in app/assets/images, I will see both common-sff832da50b.png and common-sff832da50b-4a575c6c5d24895370db5ee7e7648d3a.png in public/assets. Since Compass manages this file, I can see no reason to have Asset Pipeline "manage" it too. I can bypass Asset Pipeline by configuring Compass to compile these sprites directly into public/assets. Is there a downside to this?
It also stands to reason that I should ensure that the "source" images, which are compiled into Sprites, should not stored be stored in app/assets/images because Asset Pipeline will "manage" them as well. Remember, these "source" images are not used. The app, in development and production, uses the Sprites. As far as I can tell, there is no reason for Asset Pipeline to copy the original and a "digest" of the original to public/assets. We are only using it from within the Sprite. Does this sound reasonable? Is there a downside?
Assume: Rails 3.2.*
Thanks!
You could move the raw image to any folder outside the pipeline. Or not. It doesn't really much difference except in the time it takes to precompile, and having files floating around in a public folder that you never reference.
You have to stick the images somewhere and from Rails' opinionated point of view, this would seem to have the least resistance.
In regard to the fingerprint, you don't need the fingerprinted file either as Compass (as you say) refers to the file it creates.
There could be an issue with writing it to +/public/assets+ directly though, depending on how you deploy your project.
If you use the default Capistrano task, the assets folder is symlinked from +shared/assets+, so you would need to compile the sprite after the symlinking takes place.