Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Helper function to proxy images via Flyyer network to bypass CORS with Typescript support for Flyyer.io

License

NotificationsYou must be signed in to change notification settings

useflyyer/proxy

Repository files navigation

Helper function to proxy images via flyyer network to bypass CORS with Typescript support.

We made this forFlyyer.io to enable developers to create content-aware marketing and social images. Beware this is intended to use inside flyyer templates created withcreate-flyyer-app.

Note: This proxy service is only available and allowed for flyyer templates where bypassing CORS is necessary for images or data.

Usage

Install this dependency:

yarn add @flyyer/proxy

Common case usage:

import{proxy}from"@flyyer/proxy";exportdefaultfunctionMainTemplate({ variables}){constsrc=proxy(variables["image"]);return<imgsrc={src}/>}

Smartcrop

example image

Usage withuse-smartcrop.

import{proxy}from"@flyyer/proxy";import{useSmartcrop}from"use-smartcrop";exportdefaultfunctionMainTemplate({ width, height, variables}){constsrc=proxy(variables["image"]);constcropped=useSmartcrop(src,{ width, height,minScale:1})return<imgsrc={cropped.src}/>}

About

Helper function to proxy images via Flyyer network to bypass CORS with Typescript support for Flyyer.io

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp