Skip to content

Commit

Permalink
handle relative url in Nitrogen AIO
Browse files Browse the repository at this point in the history
this will avoid errors for relative URLs

Co-authored-by: JJ Kasper <jj@jjsweb.site>
  • Loading branch information
chandanpasunoori and ijjk authored Sep 18, 2024
1 parent 16a0ad4 commit 97024e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/02-app/02-api-reference/05-next-config-js/images.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ export default function thumborLoader({ src, width, quality }) {
```js
// Docs: https://docs.n7.io/aio/intergrations/
export default function aioLoader({ src, width, quality }) {
const url = new URL(src)
const url = new URL(src, window.location.href)
const params = url.searchParams
const aioParams = params.getAll('aio')
aioParams.push(`w-${width}`)
Expand Down

0 comments on commit 97024e8

Please sign in to comment.