Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Latest commit

 

History

History
66 lines (40 loc) · 1.38 KB

README.md

File metadata and controls

66 lines (40 loc) · 1.38 KB

11ty Exif plugin

This plugin:

  • 🖼️ adds an exif filter
  • 🖼️ renders f-number, exposure time, focal length and ISO of your image (if available)

Do you find this useful? Feel free to sponsor me a beer via PayPal


Getting started

Installation

Enter your project folder and run:

# npm
npm install eleventy-plugin-exif --save-dev

# yarn
yarn add eleventy-plugin-exif --dev

Update your project's .eleventy.js to enable the plugin:

const exifPlugin = require('eleventy-plugin-exif');

module.exports = function (eleventyConfig) {
  eleventyConfig.addPlugin(exifPlugin);
};

Usage

In your templates, use the following syntax to extract the exif information out of your image and render them:

// nunjucks/liquid
{{ 'path/to/image.jpg' | exif }}

// handlebars
{{{exif 'path/to/image.jpg' }}}

Dependencies

Contributing

Contributions are welcome, feel free to file issues, fork and submit Pull Requests!

Authors

You can find also have a look at all the beautiful people who contributed to this project.

License

This project is licensed under the MIT LICENSE.