Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

paperclip-mozjpeg

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

paperclip-mozjpeg

bundlerRubygems
Version
0.0.2
Version published
Maintainers
1
Created
Source

About

This repository contains the ruby library which adds file processor to compress JPEG images uploaded using the paperclip gem.

Installation

Add this line to your application's Gemfile:

gem 'paperclip-mozjpeg'

# To use bundled binaries of MozJPEG 3.0 for Mac OS X, Linux and Windows add:
gem 'mozjpeg'

And then execute:

$ bundle

Or install it yourself as:

$ gem install paperclip-mozjpeg

To install bundled binaries (must require 'mozjpeg' if not using bundler):

$ gem install mozjpeg

Usage

class User < ActiveRecord::Base
  has_attached_file :avatar, :styles => {
    :tiny => {
      geometry: '190x190>',
      mozjpeg_options: '-quality 30', 
    },
    :large => {
      geometry: '1280x1280>',
      mozjpeg_options: '-quality 70 -quant-table 2 -notrellis',
    }
  },
  processors: [ :thumbnail, :mozjpeg ]
end

If you don't want to use the mozjpeg gem bundled binaries and want to specify the path to mozjpeg (cjpeg) or it is not in the PATH use the mozjpeg_path option.

License

This gem is licensed under the MIT license.

Contributing

  • Fork it ( https://github.com/svoboda-jan/paperclip-mozjpeg/fork )
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create a new Pull Request

FAQs

Package last updated on 19 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts