Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@netlify/ipx

Package Overview
Dependencies
Maintainers
14
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@netlify/ipx

on-demand image optimization for Netlify

  • 0.0.10
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
18K
decreased by-65.01%
Maintainers
14
Weekly downloads
 
Created
Source

Netlify Optimized Images

On Demand image optimazation for Netlify using ipx.

😺 Online demo: https://netlify-ipx.netlify.app

Usage

Add @netlify/ipx as devDependency:

# npm
npm i -D @netlify/ipx

# yarn
yarn add --dev @netlify/ipx

Create netlify/functions/ipx.ts:

import { createIPXHandler } from '@netlify/ipx'

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):

<img src="/.netlify/functions/ipx/w_200/static/test.jpg"/>

Resize and change format for a remote url:

<img src="/.netlify/functions/ipx/f_webp,w_450/https://images.unsplash.com/photo-1514888286974-6c03e2ca1dba"/>

Local development

  • Clone repository
  • Install dependencies with yarn install
  • Install netlify development server with yarn dev
  • Open http://localhost:8888

License

MIT

FAQs

Package last updated on 22 Feb 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