Skip to content

Commit 27d1817

Browse files
committed
feat: relative url support for images
1 parent 3fc766d commit 27d1817

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.changeset/light-fireants-rest.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"frames.js": patch
3+
---
4+
5+
feat: relative url support for images

packages/frames.js/src/middleware/renderResponse.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,11 @@ export function renderResponse(): FramesMiddleware<any, {}> {
109109
// and disabling it, has no effect on final bundle size of app
110110
image:
111111
typeof result.image === "string"
112-
? result.image
112+
? generateTargetURL({
113+
target: result.image,
114+
currentURL: context.url,
115+
basePath: context.basePath,
116+
})
113117
: await renderImage(result.image, result.imageOptions).catch(
114118
(e) => {
115119
console.error(e);

0 commit comments

Comments
 (0)