Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transform Images plugin: "VipsOperation: class "jxlsave_buffer" not found" #630

Closed
johanbrook opened this issue Jul 3, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@johanbrook
Copy link

johanbrook commented Jul 3, 2024

Version

2.2.2

Platform

macOS Sonoma 14.4

What steps will reproduce the bug?

_config.ts

import lume from "lume/mod.ts";
import picture from "lume/plugins/picture.ts";
import transform_images from "lume/plugins/transform_images.ts";

const site = lume();

site.use(picture());
site.use(transform_images());

export default site;

index.page.ts

export default function () {
    return `
        <html>
            <body>
                <div transform-images="jxl avif jpg 647@2">
                    <img src="/uploads/img_2158.jpg" alt="">
                </div>
            </body>
        </html>
    `;
}

Then run:

deno task serve

How often does it reproduce? Is there a required condition?

Every time.

What is the expected behavior?

The correct images are generated into _site/uploads.

What do you see instead?

Loading config file file:///Users/brookie/code/travelling-brooks/_config.ts
Error: VipsOperation: class "jxlsave_buffer" not found
    at Sharp.toBuffer (file:///Users/brookie/Library/Caches/deno/npm/registry.npmjs.org/sharp/0.33.4/lib/output.js:161:17)
    at transform (https://deno.land/x/lume@v2.2.1/plugins/transform_images.ts:203:45)
    at eventLoopTick (ext:core/01_core.js:168:7)
    at async processPage (https://deno.land/x/lume@v2.2.1/plugins/transform_images.ts:143:13)
    at async Promise.all (index 0)
    at async concurrent (https://deno.land/x/lume@v2.2.1/core/utils/concurrent.ts:21:3)
    at async process (https://deno.land/x/lume@v2.2.1/plugins/transform_images.ts:101:7)
    at async Processors.run (https://deno.land/x/lume@v2.2.1/core/processors.ts:32:7)
    at async Site.#buildPages (https://deno.land/x/lume@v2.2.1/core/site.ts:687:5)
    at async Site.build (https://deno.land/x/lume@v2.2.1/core/site.ts:530:9) {
  message: 'VipsOperation: class "jxlsave_buffer" not found'
}

Additional information

Removing jxl from transform-images="jxl avif jpg 647@2" fixes it.

@johanbrook johanbrook added the bug Something isn't working label Jul 3, 2024
@oscarotero
Copy link
Member

It seems a bug in sharp library. I've created this issue: lovell/sharp#4153

@oscarotero
Copy link
Member

I got response. Seems that it requires to compile libvips with support for libjxl. It will change when jpegxl gets a bigger adoption

@oscarotero
Copy link
Member

Probably, Lume shouldn't allow this value meanwhile.

@johanbrook
Copy link
Author

Yep, looks like it. Good to know!

I’ll leave this issue open until you feel mentions about JPEG XL are removed from code and docs.

@oscarotero
Copy link
Member

I'm closing this because I just released a new version of Lume without the JXL format, and it's now mentioned in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants