Hi there!
I’ve started using the Eleventy Image plugin, and it works wonders on my local test build. After making my changes, I decided to deploy them, only to discover that the build failed.
The error boils down to this: Input file contains unsupported image format
There’s an “IMAGE_DATA” log line that confirmed my suspicions (full log at the end of the post).
Given I am using plain old JPG files, I have a hard time believing I’m doing anything special here. But then I went and had a think…
I am making use of Netlify Large Media (Netlify’s large file storage), which would mean that my images are technically not images but pointers to images… So if that’s the case, it would make sense that the error is saying it’s not a supported image type.
I saw a post from 2019 which seems related, and a reply mentions this as a limitation. I guess that makes sense, however given it is now 3.5 years later, I figured I’d open a new thread to see if there were any changes to this situation.
Are there any updates to might resolve this issue? Or should I drop the use of the Eleventy Image plugin and simply rely on Netlify’s image transforms?
I don’t mind using transforms if I have no other choice (since I feel having Netlify Large Media is a priority), but the image plugin works so well and is very versatile, it’s kind of a shame if it can’t be leveraged to improve images all around, so I’d rather double-check here before abandoning it.
Many thanks!
Chris
Full build log
11:18:06 PM: build-image version: a2d22d22e4555d1ef0a972ed14a0a4b366ad20c4 (focal)
11:18:06 PM: build-image tag: v4.16.3
11:18:06 PM: buildbot version: 0d92ba804851e1768a79721ec5ad312cd15c4ac9
11:18:06 PM: Fetching cached dependencies
11:18:06 PM: Starting to download cache of 260.3MB
11:18:08 PM: Finished downloading cache in 2.041696822s
11:18:08 PM: Starting to extract cache
11:18:10 PM: Finished extracting cache in 1.642551591s
11:18:10 PM: Finished fetching cache in 3.727971452s
11:18:10 PM: Starting to prepare the repo for build
11:18:10 PM: Netlify Large Media is enabled, running git commands with GIT_LFS_SKIP_SMUDGE=1
11:18:10 PM: Preparing Git Reference refs/heads/main
11:18:11 PM: Parsing package.json dependencies
11:18:12 PM: Starting build script
11:18:12 PM: Installing dependencies
11:18:12 PM: Python version set to 2.7
11:18:13 PM: Started restoring cached Node.js version
11:18:13 PM: Finished restoring cached Node.js version
11:18:13 PM: Attempting Node.js version ‘18.6.0’ from .nvmrc
11:18:13 PM: v18.6.0 is already installed.
11:18:14 PM: Now using node v18.6.0 (npm v8.13.2)
11:18:14 PM: Enabling Node.js Corepack
11:18:14 PM: Started restoring cached build plugins
11:18:14 PM: Finished restoring cached build plugins
11:18:14 PM: Attempting Ruby version 2.7.2, read from environment
11:18:14 PM: Using Ruby version 2.7.2
11:18:15 PM: Using PHP version 8.0
11:18:15 PM: Started restoring cached corepack dependencies
11:18:15 PM: mv: cannot move ‘/opt/build/cache/.node/corepack’ to ‘/opt/buildhome/.node/corepack’: No such file or directory
11:18:15 PM: Finished restoring cached corepack dependencies
11:18:15 PM: No npm workspaces detected
11:18:15 PM: Started restoring cached node modules
11:18:15 PM: Finished restoring cached node modules
11:18:15 PM: Bypassing sha validation. Running pre & post install scripts
11:18:15 PM: Installing npm packages using npm version 8.13.2
11:18:20 PM: added 41 packages, and audited 637 packages in 4s
11:18:20 PM: 69 packages are looking for funding
11:18:20 PM: run npm fund
for details
11:18:20 PM: 13 vulnerabilities (4 low, 6 high, 3 critical)
11:18:20 PM: To address issues that do not require attention, run:
11:18:20 PM: npm audit fix
11:18:20 PM: To address all issues possible (including breaking changes), run:
11:18:20 PM: npm audit fix --force
11:18:20 PM: Some issues need review, and may require choosing
11:18:20 PM: a different dependency.
11:18:20 PM: Run npm audit
for details.
11:18:20 PM: npm packages installed
11:18:20 PM: Started restoring cached go cache
11:18:20 PM: Finished restoring cached go cache
11:18:20 PM: Installing Go version 1.17 (requested 1.17)
11:18:24 PM: unset GOOS;
11:18:24 PM: unset GOARCH;
11:18:24 PM: export GOROOT=‘/opt/buildhome/.gimme/versions/go1.17.linux.amd64’;
11:18:24 PM: export PATH=“/opt/buildhome/.gimme/versions/go1.17.linux.amd64/bin:${PATH}”;
11:18:24 PM: go version >&2;
11:18:24 PM: export GIMME_ENV=“/opt/buildhome/.gimme/env/go1.17.linux.amd64.env”
11:18:24 PM: go version go1.17 linux/amd64
11:18:24 PM: Detected 1 framework(s)
11:18:24 PM: “eleventy” at version “2.0.0-canary.23”
11:18:24 PM: Installing missing commands
11:18:24 PM: Verify run directory
11:18:24 PM: Section completed: initializing
11:18:25 PM:
11:18:25 PM: Netlify Build
11:18:25 PM: ────────────────────────────────────────────────────────────────
11:18:25 PM:
11:18:25 PM: ❯ Version
11:18:25 PM: @netlify/build 29.4.1
11:18:25 PM:
11:18:25 PM: ❯ Flags
11:18:25 PM: baseRelDir: true
11:18:25 PM: buildId: 63be387c76bfd20008713791
11:18:25 PM: deployId: 63be387c76bfd20008713793
11:18:25 PM:
11:18:25 PM: ❯ Current directory
11:18:25 PM: /opt/build/repo
11:18:25 PM:
11:18:25 PM: ❯ Config file
11:18:25 PM: /opt/build/repo/netlify.toml
11:18:25 PM:
11:18:25 PM: ❯ Context
11:18:25 PM: production
11:18:25 PM:
11:18:25 PM: ❯ Loading plugins
11:18:25 PM: - @netlify/plugin-lighthouse@4.0.3 from Netlify app
11:18:25 PM: - netlify-plugin-cache@1.0.3 from netlify.toml and package.json
11:18:27 PM:
11:18:27 PM: 1. netlify-plugin-cache (onPreBuild event)
11:18:27 PM: ────────────────────────────────────────────────────────────────
11:18:27 PM:
11:18:27 PM: A cache of ‘_site/images, .cache’ doesn’t exist (yet).
11:18:27 PM: (netlify-plugin-cache onPreBuild completed in 7ms)
11:18:27 PM:
11:18:27 PM: 2. build.command from netlify.toml
11:18:27 PM: ────────────────────────────────────────────────────────────────
11:18:27 PM:
11:18:27 PM: $ eleventy
11:18:28 PM: [11ty] Ran eleventy.before in 0.40 seconds
11:18:29 PM: ./src/en/posts/2022-12-29-year-in-review-2022/gowr-axe.jpg
11:18:29 PM: IMAGE_DATA: version Git Large File Storage | Git Large File Storage (LFS) replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server like GitHub.com or GitHub Enterprise.
11:18:29 PM: oid sha256:a808a28abfcf65d2162b26adb381c26a577a508b70b66dfe4977fabd63ba300f
11:18:29 PM: size 379077
11:18:29 PM: [11ty] Problem writing Eleventy templates: (more in DEBUG output)
11:18:29 PM: [11ty] 1. Having trouble rendering njk template ./src/en/posts/2022-12-29-year-in-review-2022/index.md (via TemplateContentRenderError)
11:18:29 PM: [11ty] 2. (./src/en/posts/2022-12-29-year-in-review-2022/index.md)
11:18:29 PM: [11ty] EleventyShortcodeError: Error with Nunjucks paired shortcode gallery
(via Template render error)
11:18:29 PM: [11ty] 3. Error with Nunjucks shortcode localimage
(via Template render error)
11:18:29 PM: [11ty] 4. Input file contains unsupported image format (via Template render error)
11:18:29 PM: [11ty]
11:18:29 PM: [11ty] Original error stack trace: Error: Input file contains unsupported image format
11:18:29 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2 (Search results for '"non-zero exit code: 2"' - Netlify Support Forums)
11:18:29 PM: [11ty] Copied 69 files / Wrote 0 files in 0.85 seconds (v2.0.0-canary.23)
11:18:29 PM:
11:18:29 PM: “build.command” failed
11:18:29 PM: ────────────────────────────────────────────────────────────────
11:18:29 PM:
11:18:29 PM: Error message
11:18:29 PM: Command failed with exit code 1: eleventy (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)
11:18:29 PM:
11:18:29 PM: Error location
11:18:29 PM: In build.command from netlify.toml:
11:18:29 PM: eleventy
11:18:29 PM:
11:18:29 PM: Resolved config
11:18:29 PM: build:
11:18:29 PM: command: eleventy
11:18:29 PM: commandOrigin: config
11:18:29 PM: environment:
11:18:29 PM: - NETLIFY_LFS_ORIGIN_URL
11:18:29 PM: - TWITTER_BEARER_TOKEN
11:18:29 PM: publish: /opt/build/repo/_site
11:18:29 PM: publishOrigin: config
11:18:29 PM: headers:
11:18:29 PM: - for: /assets/css/.css values: cache-control: public, max-age=1209600 - for: / values: Permissions-Policy: interest-cohort=() headersOrigin: config plugins: - inputs: {} origin: ui package: ‘@netlify/plugin-lighthouse’ - inputs: {} origin: config package: netlify-plugin-cache redirects: - from: /design to: /designs - from: /shirts to: /designs - from: /posters to: /designs - from: /art to: /designs - force: true from: /follow/ status: 301 to: /follow.rss - from: /uses to: /acknowledgements#uses - from: /fr/usages to: /fr/remerciements/#usages - from: /fr/* status: 404 to: /fr/404.html - from: /* status: 404 to: /en/404.html redirectsOrigin: configCaching artifacts
11:18:29 PM: Started saving node modules
11:18:29 PM: Finished saving node modules
11:18:29 PM: Started saving build plugins
11:18:29 PM: Finished saving build plugins
11:18:29 PM: Started saving pip cache
11:18:29 PM: Finished saving pip cache
11:18:29 PM: Started saving emacs cask dependencies
11:18:29 PM: Finished saving emacs cask dependencies
11:18:29 PM: Started saving maven dependencies
11:18:29 PM: Finished saving maven dependencies
11:18:29 PM: Started saving boot dependencies
11:18:29 PM: Finished saving boot dependencies
11:18:29 PM: Started saving rust rustup cache
11:18:29 PM: Finished saving rust rustup cache
11:18:29 PM: Started saving go dependencies
11:18:29 PM: Finished saving go dependencies
11:18:29 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
11:18:29 PM: Failing build: Failed to build site
11:18:29 PM: Finished processing build request in 23.382511688s