Skip to content

wrstudios/image-proxy

Repository files navigation

image-proxy

image proxy utilities for client apps

Strategies

  1. proxy - route http photo through our https proxy
  2. swap - swap protocols from http to https
  3. null/nil/undefined - no strategy, return original

Installation

yarn add @wrstudios/image-proxy

Publishing a new version

  1. Make changes on branch
  2. Commit changes
  3. Merge changes into master
  4. yarn bump: [patch|minor|major]
  5. Update package dependency to new version in consuming apps.

Quick Start

import { getProxiedImageUrl } from "@wrstudios/image-proxy";

const strategy = "swap"
const url = "http://something.com/image"
const finalImageUrl = getProxiedImageUrl({ url, strategy })
console.log(finalImageUrl) //=> https://something.com/image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published