An open API service indexing awesome lists of open source software.

https://github.com/perseus333/jekyll-highres-link

A Jekyll plugin that automatically wraps <img> tags with links to their high-res versions
https://github.com/perseus333/jekyll-highres-link

bandwidth-saver jekyll jekyll-plugin ruby

Last synced: 6 months ago
JSON representation

A Jekyll plugin that automatically wraps <img> tags with links to their high-res versions

Awesome Lists containing this project

README

          

# Jekyll High-res Link

A jekyll plugin that wraps tags with links to uncompressed originals, saving bandwidth

## Usage

1. Add the pulgin to your Gemfile
```
gem 'jekyll-highres-link'
```

2. Add the plugin to your _config file:
```
plugins:
- jekyll-highres-link
- OTHER_PLUGINS...
```

3. Configure the path for the uncompressed images. You can either go with relative or absolute paths (from the root of the project). For absolute paths add in the _config.yaml file the directory with a starting "/":
```
highres-link:
- uncompressed_dir: /absolute/path
```
OR, if the uncompressed images depend on the image location, don't add a starting "/"
```
highres-link:
- uncompressed_dir: relative/path
```
4. That's it!

## To be added
- [ ] Automatically compress the images (for now, you can run the following fish script: [compress.fish](https://gist.github.com/Perseus333/8a161ffa160b0d2f6c2fd3c9756b1568))