New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

remix-image-wasm

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remix-image-wasm

A Web Assembly transformer for remix-image

  • 0.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
decreased by-11.11%
Maintainers
1
Weekly downloads
 
Created
Source

Remix-Image-Wasm

👋 Intro

A WebAssembly transformer for Remix-Image

🚀 How to use

Install

To install this library, use one of the following commands:

npm install -S remix-image-wasm
yarn add remix-image-wasm

Implement

To use this transformer, set the transformer property in your ImageLoader API route:

import type { LoaderFunction } from "remix";
import { wasmTransformer } from "remix-image-wasm";
import { imageLoader, DiskCache } from "remix-image/server";

const config = {
  selfUrl: "http://localhost:3000",
  cache: new DiskCache(),
  transformer: wasmTransformer,
};

export const loader: LoaderFunction = ({ request }) => {
  return imageLoader(config, request);
};

Then make sure the wasm files are accessible in your environment.

Cloudflare:

Add the following lines to the bottom of your wrangler.toml file:

[wasm_modules]
AVIF_ENC_WASM = "node_modules/remix-image-wasm/avif_enc.wasm"
AVIF_DEC_WASM = "node_modules/remix-image-wasm/avif_dec.wasm"
JPEG_ENC_WASM = "node_modules/remix-image-wasm/jpeg_enc.wasm"
JPEG_DEC_WASM = "node_modules/remix-image-wasm/jpeg_dec.wasm"
PNG_WASM = "node_modules/remix-image-wasm/png.wasm"
WEBP_ENC_WASM = "node_modules/remix-image-wasm/webp_enc.wasm"
WEBP_DEC_WASM = "node_modules/remix-image-wasm/webp_dec.wasm"

Docs

  • Documentation for this library can be found at: https://remix-image.mcfarl.in

FAQs

Package last updated on 16 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc