headshot of Chris Tonkinson
Chris Tonkinson

tech {enthusiast, practitioner, leader, podcaster, mentor, entrepreneur}

HomeAboutTags



Refactored Podcast

I co-host Refactored, a casual, ongoing conversation between two technology leaders trying to suck a little less every day.

Career Schema Project

I founded the Career Schema Project with the mission of developing open standards and technology to reduce the hassle of online jobseeking.


RSS Subscribe

© 2024 Chris Tonkinson

Jekyll Plugin: Automatically Optimize Images


Jekyll is a great platform for managing static sites (like chris.tonkinson.com). It does the Right Thing™ out of the box, is simple to initialize and deploy, and it plays very nicely with some popular hosting options like GitHub Pages, S3, and Heroku. If roll-your-own-blog (the “Hello World!” of web development) doesn’t sound productive enough, WordPress doesn’t sound secure enough (cough cough it isn’t), and Ghost doesn’t sound mature enough, Jekyll might be your sweet spot.

Jekyll has the advantage of a huge plugins ecosystem. One example of a great Jekyll plugin is image_optim-jekyll-plugin — brainchild of @chrisanthropic — which is a simple but robust plugin built around @toy’s excellent image_optim meta-project. image_optim is a clever Ruby Gem that wraps about a dozen different low-level image manipulation libraries and provides a clean unified interface such that you can simply chuck in any image file you might have on hand, and it will intelligently delegate your request to the corresponding library.

Check out the image_optim-jekyll-plugin README, but the TL;DR is that after you install this plugin, it automatically optimizes all of your Jekyll images at build-time. I recently contributed some documentation as well as functional changes so you can control which images get optimized, and where the plugin stores its artifacts.

It’s just one more way you can cajole Jekyll into silently doing more work on your behalf.