From e58a92527f54cb29d3515d544fad833a5ce1061d Mon Sep 17 00:00:00 2001 From: Vincent Tavernier Date: Tue, 7 Mar 2023 19:00:34 +0100 Subject: [@astrojs/image] Handle missing trailing slash in processStaticImage (#6421) The code path changed by this commit isn't only taken when running using Vite. If the site is configured with a base url which is different from `/` but does **not** end with `/` (for example, because `trailingSlash` is set to `never`), the `- 1` results in an off-by-one error when truncating the URL. By checking if the base url ends with `/`, we can determine the right length for the prefix to truncate. --- .changeset/eleven-mugs-flash.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/eleven-mugs-flash.md (limited to '.changeset/eleven-mugs-flash.md') diff --git a/.changeset/eleven-mugs-flash.md b/.changeset/eleven-mugs-flash.md new file mode 100644 index 000000000..e733a9ff0 --- /dev/null +++ b/.changeset/eleven-mugs-flash.md @@ -0,0 +1,5 @@ +--- +'@astrojs/image': patch +--- + +Handle missing trailing slash in processStaticImage -- cgit v1.2.3