Reputation: 391
I have an API endpoint /api/thumbnail
which returns a JPEG image.
What I want is make this endpoint accepts .jpg
, like this /api/thumbnail.jpg
.
Is it possible using pure NextJS or I need to use vercel.json
?
Upvotes: 1
Views: 167
Reputation: 13024
Simply change your file name from
./pages/api/thumbnail.(js|ts)x?
to
./pages/api/thumbnail.jpg.(js|ts)x?
Upvotes: 1