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

fix image url in imageFunction #159

Merged
merged 1 commit into from
Jan 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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