Skip to content
This repository has been archived by the owner on May 10, 2021. It is now read-only.

Commit

Permalink
fix image url in imageFunction (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
lindsaylevine authored Jan 27, 2021
1 parent bdd3ce2 commit 200eee2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/templates/imageFunction.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exports.handler = async (event) => {
const quality = parseInt(q);

const imageUrl = url.startsWith("/")
? `${process.env.URL || "http://localhost:8888"}${url}`
? `${process.env.DEPLOY_URL || `http://${event.headers.host}`}${url}`
: url;
const image = await jimp.read(imageUrl);

Expand Down

0 comments on commit 200eee2

Please sign in to comment.