Created
May 6, 2016 10:05
-
-
Save jeroenvisser101/8fe83792ea92c8cd4b55edf705f57c97 to your computer and use it in GitHub Desktop.
Simple image optimisation in image_optim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lib/tasks/assets.rake | |
require 'image_optim' | |
require 'image_optim/runner' | |
namespace :assets do | |
desc 'Runs image_optim on the assets.' | |
task :optimize do | |
image_optim = ImageOptim::Runner.new(recursive: true) | |
image_optim.run!(Dir['app/**/*.{svg,jpg,png,jpeg,gif}']) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment