Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[FR] Are there any plans to allow custom CDN URLs for WASM files? #41

Copy link
Copy link
@Vizards

Description

@Vizards
Issue body actions

Is your feature request related to a problem? Please describe.
Thank you for your excellent work so far!

As we know, users in some internal or special networks may have difficulty accessing some static files provided by third-party CDNs. All utility functions under the browser branch of ImageScript have hardcoded WASM resource files from unpkg.com. It would be helpful to provide a configuration function to customize the location of the WASM resources.

Another potential issue is that the current WASM version of ImageScript seems to only provide the final JavaScript file for deployment. Is there any plan to release a separate npm package for the browser branch?

Describe the solution you'd like

  • The expected WASM file configuration API might be similar to the way vercel/satori embeds yoga.wasm: Runtime and WASM. The difference is that we seem to need to configure more WASM files. Currently, I can find the following in the code:

    • https://unpkg.com/imagescript@${version}/wasm/any/font.wasm
    • https://unpkg.com/imagescript@${version}/wasm/any/gif.wasm
    • https://unpkg.com/imagescript@${version}/wasm/any/jpeg.wasm
    • https://unpkg.com/imagescript@${version}/wasm/any/svg.wasm
    • https://unpkg.com/imagescript@${version}/wasm/any/tiff.wasm
    • ...(any omissions?)
  • For releasing the browser branch separately to npm, I would like to hear more of your opinions.

Additional context
If needed, I am happy to arrange time to develop this feature and submit a Pull Request.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.