image proxy utilities for client apps
proxy
- route http photo through our https proxyswap
- swap protocols from http to httpsnull/nil/undefined
- no strategy, return original
yarn add @wrstudios/image-proxy
- Make changes on branch
- Commit changes
- Merge changes into master
yarn bump: [patch|minor|major]
- Update package dependency to new version in consuming apps.
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