0.0.1 • Published 4 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-ipxCreate 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