{"id":31548706,"url":"https://github.com/jonniecache/jekyll-thumb","last_synced_at":"2025-10-04T16:51:34.971Z","repository":{"id":56878989,"uuid":"151265574","full_name":"JonnieCache/jekyll-thumb","owner":"JonnieCache","description":"This Jekyll plugin automatically generates image thumnails using libvips","archived":false,"fork":false,"pushed_at":"2019-05-29T16:30:53.000Z","size":10,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-03T15:39:52.947Z","etag":null,"topics":["image-processing","jekyll","jekyll-plugin","liquid","ruby","thumbnails","vips"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JonnieCache.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-02T14:10:46.000Z","updated_at":"2023-11-17T04:47:15.000Z","dependencies_parsed_at":"2022-08-20T11:40:28.612Z","dependency_job_id":null,"html_url":"https://github.com/JonnieCache/jekyll-thumb","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/JonnieCache/jekyll-thumb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonnieCache%2Fjekyll-thumb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonnieCache%2Fjekyll-thumb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonnieCache%2Fjekyll-thumb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonnieCache%2Fjekyll-thumb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JonnieCache","download_url":"https://codeload.github.com/JonnieCache/jekyll-thumb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonnieCache%2Fjekyll-thumb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278343086,"owners_count":25971399,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["image-processing","jekyll","jekyll-plugin","liquid","ruby","thumbnails","vips"],"created_at":"2025-10-04T16:51:31.257Z","updated_at":"2025-10-04T16:51:34.896Z","avatar_url":"https://github.com/JonnieCache.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jekyll-thumb\n\nThis Jekyll plugin automatically generates image thumnails using the [vips](https://jcupitt.github.io/libvips) library and the accompanying ruby wrapper, [ruby-vips.](https://github.com/jcupitt/ruby-vips)\n\nlibvips is like imagemagick but more modern.\n\nThe plugin adds a `thumb` Liquid tag that can be used like so:\n\n```html\n{% thumb src=\"/image.png\" width=\"100\" %}\n```\n\nThis will generate the thumbnail and output something like:\n\n```html\n\u003ca href=\"/image.png\" target=\"_blank\" class=\"thumb\"\u003e\n  \u003cimg src=\"/image-100w.png\" width=\"100\" height=\"50\"\u003e\n\u003c/a\u003e\n```\n\n## Development Status\n\nThis project was made because I needed thumbnails for [my blog](https://cleverna.me) and I didn't want to use imagemagick. I made it in like an hour and it definitely has bugs. OTOH it's 119 lines of code so if you don't like something you can just change it.\n\n## Installation\n\nAdd the gem to your Gemfile:\n\n```ruby\ngem 'jekyll-thumb'\n```\n\nThen bundle:\n\n    $ bundle\n\nOr install it yourself with:\n\n    $ gem install jekyll-thumb\n    \nFinally install vips using your operating system's package manager, eg.\n\n    $ brew install vips\n\n## Usage\n\nUse it like this in any Liquid template:\n\n```html\n{% thumb src=\"/image.png\" width=\"100\" %}\n```\n\nYou must specify either a `width` or a `height`, but not both. Whichever dimension you specify, the other will be scaled to a matching ratio.\n\nTo use variables for the image or the dimensions, simply leave out the quotes:\n\n```html\n{% thumb src=page.cover_image height=page.cover_image_height %}\n```\n\nBy default this will wrap the resized `img` in a link to the original, with a `target=\"_blank\"` attribute. To supress this, pass a `link=false` option to the `thumb` tag.\n\n## Optipng\n\nIf you have `optipng` installed and in your PATH, you can tell the plugin to run it on all generated png images.\n\nJust add:\n\n```\nthumb:\n  optipng: true\n```\n\nTo your `_config.yml`\n\nCurrently the plugin doesn't optimize other image formats, except for stripping color palettes.\n\n## Caching images\n\nOptimizing and resizing can take a while for some images. You can specify a cache folder in your Jekyll config to let jekyll-thumb cache images between runs.\n\n```\nthumb:\n  cache: \"/tmp/images\"\n```\n\n## Contributing\n\nMake an issue, send a pull request, you know the drill.\n\n## Acknowledgements\n\nProject shamelessly ripped off of [netlify/jekyll-srcset](https://github.com/netlify/jekyll-srcset), it's basically a find-and-replace job.\n\n## Copyright\n\nCopyright (c) 2018 Jonathan Davies. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonniecache%2Fjekyll-thumb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonniecache%2Fjekyll-thumb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonniecache%2Fjekyll-thumb/lists"}