Skip to content

Instantly share code, notes, and snippets.

@dv
Created October 27, 2013 21:56
Show Gist options
  • Save dv/7188341 to your computer and use it in GitHub Desktop.
Save dv/7188341 to your computer and use it in GitHub Desktop.
# Important to tell Sprockets this is a binary type, else you'll get UTF-8 byte sequence errors
Rails.application.assets.register_mime_type 'image/png', '.png'
# Register our processor as a post-processor for every PNG file
Rails.application.assets.register_postprocessor 'image/png', PngQuantProcessor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment