Giter Site home page Giter Site logo

jekyll_image_processing's Introduction

JekyllImageProcessing

Jekyll plugin for processing images using image_processing and libvips.

Installation

Add this line to your Jekyll site's Gemfile:

gem 'jekyll_image_processing', git: 'https://github.com/benubois/jekyll_image_processing'

Usage

Create a plugin in _plugins/bundler.rb with the contents:

require "rubygems"
require "bundler/setup"
Bundler.require(:default)

Define image presets in your _config.yml file:

image_processing:
  large:
    source: photos/original
    destination: photos/large
    resize_to_limit: [2048, 2048]
  thumbnail:
    source: photos/original
    destination: photos/thumbnail
    rotate: 90
    resize_to_limit: [2048, 2048]
    invert: true
    gaussblur: 20
    crop: [0, 0, 300, 300]
    gaussblur: 2
    rotate:
      - 45
      - background: [0, 0, 0]
    resize_to_fill:
      - 640
      - 640
      - crop: attention
    saver:
      quality: 10
  tint:
    source: photos/original
    destination: photos/tint
    resize_to_limit: [1, 1]

See the image_processing documentation for all available commands.

Linking to Processed Images

Images are fingerprinted so that they do not need to be reprocessed every time. A Liquid filter is included to help link to processed images:

<img src="{{ image.name | processed_path: 'thumbnail' }}">

jekyll_image_processing's People

Contributors

benubois avatar lukashass avatar simonwalczak avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.