From section 4.1.2 in the canonical Rails Guides:
When files are precompiled, Sprockets also creates a gzipped (.gz) version of your assets.
To precompile your assets, use the bundled rake task:
# from command line
RAILS_ENV=production bundle exec rake assets:precompile
UPDATE:
After some research into the subject, I've allegorically found that, while Sprockets compresses JS and CSS assets, it does not compress images. Then I came across this gem: sprockets-image_compressor
I haven't implemented it myself, but it claims to provide lossless compression of image assets using pngcrush and jpegoptim. Interestingly, the docs state the following:
If the environment doesn't have pngcrush and/or jpegoptim installed, the gem will fall back on binaries packaged with the gem.
Again, I haven't used this myself, but if it does what it claims, it might be exactly what you're looking for.