New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

middleman-tinify

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

middleman-tinify

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

middleman-tinify

This minimizes JPGs and PNGs during your middleman builds using the tinify.com API service. In order to use this service, you need to sign up for their service and get an API key.

Installation

Add the middleman-tinify gem to your Gemfile:

# Gemfile
gem 'middleman-tinify'

and run

bundle install

Usage

Add the following line to your middleman config file:

# config.rb

activate :tinify, key: 'WfYnAvEjI9pELLsTyh36mKiZbYLZQtZz'

By default, all PNGs and JPGs within your images_dir will be minified. The following optional configuration is available:

  • path: Configure a different path to locate the relevant images. If left blank, the images_path will be used. If your images are located in source/pictures, use path: 'pictures'.

  • proxy: You can instruct the API client to make all requests over an HTTP proxy. Set the URL of your proxy server, which can optionally include credentials. Take a look at the official API documentation of the tinify gem for an example.

N.B.: Image minification will only be done in the regular build, not in the preview server.

Running tests

Checkout this repository and execute the following commands:

bundle install
TINIFY_KEY=$YOUR_API_KEY rake

License

This software is licensed under the MIT License. View the license.

FAQs

Package last updated on 25 Sep 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc