Skip to content

Commit a3932a4

Browse files
hyochanclaude
andcommitted
perf(docs): convert godot images to WebP and add cache headers
- Convert godot-iap.png (1.3MB) to WebP (92KB) - 93% reduction - Convert announcements/godot.png (2.3MB) to WebP (309KB) - 87% reduction - Add 1-year cache headers for .webp and .png files in vercel.json Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent a9d0c8a commit a3932a4

7 files changed

Lines changed: 22 additions & 2 deletions

File tree

-2.28 MB
Binary file not shown.
309 KB
Loading

packages/docs/public/godot-iap.png

-1.32 MB
Binary file not shown.
92.3 KB
Loading

packages/docs/src/lib/images.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const LIBRARY_IMAGES = {
1010
flutter_inapp_purchase:
1111
'https://hyochan.github.io/flutter_inapp_purchase/img/logo.png',
1212
'kmp-iap': 'https://hyochan.github.io/kmp-iap/img/logo.png',
13-
'godot-iap': '/godot-iap.png',
13+
'godot-iap': '/godot-iap.webp',
1414
} as const;
1515

1616
export type LibraryName = keyof typeof LIBRARY_IMAGES;

packages/docs/src/pages/docs/updates/announcements.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ function Announcements() {
126126
}}
127127
>
128128
<img
129-
src="/announcements/godot.png"
129+
src="/announcements/godot.webp"
130130
alt="OpenIAP + Godot"
131131
style={{
132132
width: '100%',

packages/docs/vercel.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,24 @@
11
{
2+
"headers": [
3+
{
4+
"source": "/(.*).webp",
5+
"headers": [
6+
{
7+
"key": "Cache-Control",
8+
"value": "public, max-age=31536000, immutable"
9+
}
10+
]
11+
},
12+
{
13+
"source": "/(.*).png",
14+
"headers": [
15+
{
16+
"key": "Cache-Control",
17+
"value": "public, max-age=31536000, immutable"
18+
}
19+
]
20+
}
21+
],
222
"rewrites": [
323
{
424
"source": "/(.*)",

0 commit comments

Comments
 (0)