Git Product home page Git Product logo

demo-eleventy-img-netlify-cache's Introduction

Re-use Eleventy Image Disk Cache across Netlify Builds

This repository takes all of the high resolution browser logos and processes them through Eleventy Image, writing output images directly to the Eleventy output directory at _site/img/generated/.

Customize the Cache Directory (default _site/img/generated/) in:

  1. .eleventy.js (specifically the outputDir and urlPath properties)
  2. netlify.toml

Benchmarks:

222 source images, outputs AVIF and PNG formats at 40px width.

Local

Cold start:

[11ty] Writing _site/index.html from ./index.liquid
[11ty] Wrote 1 file in 13.05 seconds (v1.0.0)

Warm start:

[11ty] Writing _site/index.html from ./index.liquid
[11ty] Wrote 1 file in 1.64 seconds (v1.0.0)

Netlify servers

Cold start:

[11ty] Writing _site/index.html from ./index.liquid
[11ty] Wrote 1 file in 27.59 seconds (v1.0.0)

Warm start:

[11ty] Writing _site/index.html from ./index.liquid
[11ty] Wrote 1 file in 4.01 seconds (v1.0.0)

demo-eleventy-img-netlify-cache's People

Contributors

zachleat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

zearin seanpm2001

demo-eleventy-img-netlify-cache's Issues

A cache of '_site/images, .cache' doesn't exist (yet)

I must be doing something wrong. I followed all the setup instructions here, but I still have builds timing out at 26+ minutes, with this in the deploy log:

7:53:22 PM: A cache of '_site/images, .cache' doesn't exist (yet).
7:53:22 PM: (netlify-plugin-cache onPreBuild completed in 14ms)

I also set up netlify-plugin-debug-cache which documents the cached files in a json file… that is consistently empty.

I'm not sure how to debug this… Any help would be welcome! Thanks!

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.