Skip to content

feat: encode reserved characters in URI path#1268

Draft
riddla wants to merge 7 commits intonuxt:mainfrom
tricks-gmbh:feat/encode-reserved-characters-in-uri-path
Draft

feat: encode reserved characters in URI path#1268
riddla wants to merge 7 commits intonuxt:mainfrom
tricks-gmbh:feat/encode-reserved-characters-in-uri-path

Conversation

@riddla
Copy link

@riddla riddla commented Mar 1, 2024

I fell into a rabbit hole yesterday analysing why Slack would not show the preview of an og:image. After a long try and error I discovered that the URIs generated via the ipx provider contains ampersands respectively: the Slackbot needs URIs with encoded reserved characters in the URIs path .

With encoded characters (fit_inside%26f_png%26s_1200x630) the preview came to life.

@danielroe danielroe requested a review from pi0 April 2, 2024 16:16
@danielroe
Copy link
Member

danielroe commented Nov 3, 2025

I'm opening a new PR as I don't have permission to push to this one: #2005

@danielroe
Copy link
Member

danielroe commented Nov 3, 2025

@riddla feel free to pull in my commits in the linked branch on nuxt/image into this PR.

testing it out in the playground, it doesn't seem to work. I get this error:

[500] [IPX_ERROR] Expected number between 0.3 and 1000 for sigma but received undefined of type undefined

@riddla riddla requested a review from danielroe as a code owner November 4, 2025 06:24
@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 4, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@nuxt/image@1268

commit: 35b70c9

…ers-in-uri-path' into feat/encode-reserved-characters-in-uri-path
... and update test snapshots for consistency

nuxt#2005 (comment)
@riddla
Copy link
Author

riddla commented Nov 5, 2025

@danielroe, the change in #08fcb23 sorts the parameters in alphabetical order.

Which did fix the ipx image not showing up in the playground. But to be honest, I did not fully grasp the underlying issue in ipx, so this pragmatic approach might not be sufficient.

@danielroe danielroe marked this pull request as draft February 7, 2026 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants