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

Custom Jimp does not work on Cloudflare workers, non custom does work #1358

Open
treeder opened this issue Nov 19, 2024 · 0 comments
Open

Custom Jimp does not work on Cloudflare workers, non custom does work #1358

treeder opened this issue Nov 19, 2024 · 0 comments

Comments

@treeder
Copy link

treeder commented Nov 19, 2024

Expected Behavior

Expect it to work. I feel like it's probably not a big stretch because things work when you don't try to use a custom Jimp.

Current Behavior

If I try to make a custom Jimp with:

    let Jimp = new Jimp({
      formats: [...defaultFormats, webp],
      plugins: defaultPlugins,
    })

I get:

Uncaught ReferenceError: Buffer is not defined.

If I use the default Jimp class like this, then it works fine:

import { Jimp } from "jimp"

Buffer is likely a node specific class that needs to be replaced with a standard JS class.

Steps to Reproduce

Try to make a custom jimp with the code above using the workers SDK.

Context

  • Jimp Version: 1.6.0
  • Operating System: Linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant