Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support json response #8

Merged
merged 6 commits into from
Oct 14, 2020
Merged

feat: support json response #8

merged 6 commits into from
Oct 14, 2020

Conversation

farnabaz
Copy link
Contributor

With this PR, middleware can response json data
JSON string will has based64 encoded version of the modified image as data, width of original image as width and height of original image as height

{
      data: `data:image/${FORMAT};base64,${BUFFER.BASE64}`,
      width: WIDTH,
      height: HEIGHT
}

src/ipx.ts Outdated Show resolved Hide resolved
src/middleware.ts Outdated Show resolved Hide resolved
@pi0 pi0 merged commit 370cb7b into master Oct 14, 2020
@pi0 pi0 deleted the json-output branch October 14, 2020 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants