Menu

Every photo on our landing page is a JPEG with a .webp extension, and the CDN announces it as image/webp
📰

Every photo on our landing page is a JPEG with a .webp extension, and the CDN announces it as image/webp

DEV Community: nextjs·Daniel Pertu·1 day ago
#SHMcYUH2
#devtonextjs#devto#dev#webp#demo
Reading 0:00
15s threshold

Our landing page has three photographs on it. They live in public/ and they are called demo-1.webp , demo-2.webp and demo-3.webp .

None of them is a WebP file.

$ file public/demo-*.webp public/demo-1.webp: JPEG image data, Exif standard, baseline, precision 8, 7952x5304 public/demo-2.webp: JPEG image data, Exif standard, baseline, precision 8, 5925x3831 public/demo-3.webp: JPEG image data, Exif standard, baseline, precision 8, 6000x4000

Enter fullscreen mode

Exit fullscreen mode

The first four bytes are ff d8 ff e1 : start of image, then an APP1 segment. A WebP would open with RIFF , four bytes of length, and WEBP .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.