From 0c49b55fc91f0eb664e6a939123cd75028e7668e Mon Sep 17 00:00:00 2001 From: Julian Benegas Date: Wed, 11 Dec 2024 22:28:48 -0300 Subject: [PATCH 1/2] strip height in basehub image --- packages/basehub/src/next/image/primitive.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/basehub/src/next/image/primitive.tsx b/packages/basehub/src/next/image/primitive.tsx index 58240695..d701000f 100644 --- a/packages/basehub/src/next/image/primitive.tsx +++ b/packages/basehub/src/next/image/primitive.tsx @@ -35,7 +35,10 @@ Expected origin to be one of: !param.startsWith("width=") && !param.startsWith("quality=") && !param.startsWith("w=") && - !param.startsWith("q=") + !param.startsWith("q=") && + // also strip height because next.js doesn't need it + !param.startsWith("h=") && + !param.startsWith("height=") ); }); let newParams = [...filteredParams, ...params].join(","); @@ -58,6 +61,9 @@ Expected origin to be one of: if (url.searchParams.has("format") === false) { url.searchParams.set("format", "auto"); } + // also strip height because next.js doesn't need it + url.searchParams.delete("height"); + url.searchParams.delete("h"); } // pass old origin to new origin From f756bb0a52a0ef587414582bc263e87d9c0bd846 Mon Sep 17 00:00:00 2001 From: Julian Benegas Date: Thu, 12 Dec 2024 10:20:23 -0300 Subject: [PATCH 2/2] changeset --- packages/basehub/CHANGELOG.md | 6 ++++++ packages/basehub/package.json | 2 +- playground/CHANGELOG.md | 7 +++++++ playground/package.json | 2 +- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/basehub/CHANGELOG.md b/packages/basehub/CHANGELOG.md index 7b94b0b7..ed1b7d79 100644 --- a/packages/basehub/CHANGELOG.md +++ b/packages/basehub/CHANGELOG.md @@ -1,5 +1,11 @@ # basehub +## 7.5.29 + +### Patch Changes + +- Strip out height in BaseHubImage, as next/image doesn't require it + ## 7.5.28 ### Patch Changes diff --git a/packages/basehub/package.json b/packages/basehub/package.json index a646fc4b..b73b7c49 100644 --- a/packages/basehub/package.json +++ b/packages/basehub/package.json @@ -2,7 +2,7 @@ "name": "basehub", "description": "A very fast Headless CMS.", "author": "JB ", - "version": "7.5.28", + "version": "7.5.29", "license": "MIT", "repository": "basehub-ai/basehub", "bugs": "https://github.com/basehub-ai/basehub/issues", diff --git a/playground/CHANGELOG.md b/playground/CHANGELOG.md index 87525cdb..93acbda8 100644 --- a/playground/CHANGELOG.md +++ b/playground/CHANGELOG.md @@ -1,5 +1,12 @@ # playground +## 0.0.171 + +### Patch Changes + +- Updated dependencies + - basehub@7.5.29 + ## 0.0.170 ### Patch Changes diff --git a/playground/package.json b/playground/package.json index 33b16317..ddd5edbd 100644 --- a/playground/package.json +++ b/playground/package.json @@ -1,7 +1,7 @@ { "name": "playground", "private": true, - "version": "0.0.170", + "version": "0.0.171", "scripts": { "dev": "basehub dev & next dev --port 3003", "build": "basehub && next build",