0.1.4 • Published 1 year ago

remix-image-sharp v0.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Remix-Image-Sharp

npm.io npm.io npm.io npm.io npm.io

👋 Intro

A Sharp transformer for Remix-Image

🚀 How to use

Install

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

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

Implement

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

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

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

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

Docs

0.1.4

1 year ago

0.1.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.3

2 years ago

0.0.1

2 years ago