0.0.1 • Published 3 years ago
netlify-plugin-ipx v0.0.1
Netlify Optimized Images
on-demand image optimazation for Netlify using ipx.
😺 Online demo: https://netlify-ipx.netlify.app
Usage
Add netlify-plugin-ipx
as devDependency:
# npm
npm i -D netlify-plugin-ipx
# yarn
yarn add --dev netlify-plugin-ipx
Create netlify/functions/ipx.ts
:
import { createIPXHandler } from 'netlify-plugin-ipx/function'
export const handler = createIPXHandler({
domains: ['images.unsplash.com']
})
Now you can use IPX to optimize both local and remote assets ✨
Resize /test.jpg
(in dist
):
Resize and change format for a remote url:
Local development
- Clone repository
- Install dependencies with
yarn install
- Install netlify development server with
yarn dev
- Open http://localhost:8888
License
MIT