Skip to content

how to fix "WebAssembly.Compile is disallowed on the main thread, if the buffer size is larger than 4KB. Use WebAssembly.compile, or compile on a worker thread." #31

@zhangbowy

Description

@zhangbowy

image

const convert = require("heic-convert/browser");
const conversionResult = await convert({
  buffer: buffer, // the HEIC file buffer
  format: "JPEG", // output format
  quality: 1 // the jpeg compression quality, between 0 and 1
});

window10, chrome95

User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions