Feature Request: Free Static Asset Hosting Alternative to Cloudflare Images
Problem
The default worker/index.ts template uses Cloudflare Images for image optimization, which requires a paid subscription ($5/month minimum) and a credit card on file.
For hobby projects, startups, or developers in regions where credit cards are hard to obtain, this creates an unnecessary barrier to entry.
Current Behavior
// worker/index.ts uses env.IMAGES binding
const result = await env.IMAGES.input(body)
.transform(width > 0 ? { width } : {})
.output({ format, quality });
This requires:
- Cloudflare Images paid plan
- Credit card on file
- Additional costs for storage and transformations
Proposed Solution
Add a free alternative using Cloudflare Pages for static asset hosting:
- Static assets (images, 3D models) → Cloudflare Pages (free, unlimited bandwidth)
- Dynamic logic (SSR, API routes) → Cloudflare Workers (free tier: 100K req/day)
- No Cloudflare Images binding needed
Implementation
Option A: Documentation Only
Add a guide showing how to:
- Remove
IMAGES binding from worker
- Deploy static assets to Pages separately
- Reference Pages URL for images/models
Option B: Built-in Support
Add configuration option in vite.config.ts:
export default defineConfig({
plugins: [
vinext({
// New option: use Pages for static assets
staticAssets: {
enabled: true,
// Auto-deploy to Pages during `vinext deploy`
projectName: 'my-app-static',
},
}),
],
});
Benefits
- Zero cost for static assets (Pages free tier)
- No credit card required
- Better separation of concerns (static vs dynamic)
- Simpler architecture for small projects
Workaround (Current)
We implemented this manually:
- Removed
IMAGES binding from worker/index.ts
- Created
deploy-pages.sh script
- Deploy static assets separately to Pages
- Reference
https://<project>.pages.dev for images
# Deploy static assets
wrangler pages deploy public/ --project-name=my-app-static
# Deploy worker (without Images binding)
wrangler deploy
Environment
- vinext version: latest
- Deployment target: Cloudflare Workers + Pages
- Node.js: 22.x
Additional Context
This approach works well for:
- 3D model viewers (GLB files)
- Image-heavy applications
- Projects with large static assets
- Developers without credit cards
Would the team consider adding built-in support or at minimum, documenting this free alternative?
Feature Request: Free Static Asset Hosting Alternative to Cloudflare Images
Problem
The default
worker/index.tstemplate usesCloudflare Imagesfor image optimization, which requires a paid subscription ($5/month minimum) and a credit card on file.For hobby projects, startups, or developers in regions where credit cards are hard to obtain, this creates an unnecessary barrier to entry.
Current Behavior
This requires:
Proposed Solution
Add a free alternative using Cloudflare Pages for static asset hosting:
Implementation
Option A: Documentation Only
Add a guide showing how to:
IMAGESbinding from workerOption B: Built-in Support
Add configuration option in
vite.config.ts:Benefits
Workaround (Current)
We implemented this manually:
IMAGESbinding fromworker/index.tsdeploy-pages.shscripthttps://<project>.pages.devfor imagesEnvironment
Additional Context
This approach works well for:
Would the team consider adding built-in support or at minimum, documenting this free alternative?