Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: add Next.js and Vercel support#32

Merged
ascorbic merged 2 commits into
mainfrom
nextjs
Mar 10, 2023
Merged

feat: add Next.js and Vercel support#32
ascorbic merged 2 commits into
mainfrom
nextjs

Conversation

@ascorbic

Copy link
Copy Markdown
Owner

Adds support for Next.js (with any host) and Vercel. These are a handled little differently from existing image CDNs, because they first try to detect if the source image is already hosted on an image CDN, and if it is then it uses that directly. Only if the image is local, or is remote but not on a support CDN will it generate a /_next/image URL.

It detects /_next/image and /_vercel/image URLs, as well as /_next/static (for images imported in next.js), but in most cases you will want to specify the CDN manually.

I will follow up later with usage instructions in unpic-img.

@ascorbic ascorbic mentioned this pull request Mar 10, 2023
@ascorbic ascorbic merged commit 4cff46d into main Mar 10, 2023
@ascorbic ascorbic deleted the nextjs branch March 10, 2023 19:43
@mixie-bot mixie-bot Bot mentioned this pull request Mar 10, 2023
@mixie-bot mixie-bot Bot mentioned this pull request Dec 7, 2024
@mixie-bot mixie-bot Bot mentioned this pull request Dec 15, 2024
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.

1 participant