Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5864c3f

Browse files
/image API endpoint: Update image
Replace JPEG with GIF as requested on Twitter :)
1 parent c997def commit 5864c3f

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

‎pages/api/image.js‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import rick from "buffer-loader!../../rick.jpg";
1+
// Image source: Sumatangwang via Tenor: https://tenor.com/bfLqf.gif
2+
import rick from "buffer-loader!../../rick.gif";
23

34
export default (req, res) => {
45
res.status(200);
5-
res.setHeader("Content-Type", "image/jpeg");
6+
res.setHeader("Content-Type", "image/gif");
67
// Send the image buffer. There are many other ways to send images and other
78
// files. For example, you can create a buffer from a base64-encoded string
89
// of an image: https://stackoverflow.com/a/28440633/6451879

‎rick.gif‎

3.14 MB
Loading[フレーム]

‎rick.jpg‎

-46.6 KB
Binary file not shown.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /