Skip to content

farcasterxyz/mini-app-img-next

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a simple Next project that generates dynamic Mini App Embed images.

Deploy with Vercel

Getting Started

pnpm install
pnpm dev
http://localhost:3000/api/img?title=Title&description=Description

Create a dynamic image using query parameters or other data sources.

Next Image Response docs

Setup additional templates by adding directories + route.ts files under app/img:

app/img/other/route.ts ->  http://localhost:3000/api/img/other

Next Project Structure docs

Caching

By default images will be served with a Cache-Control: public, immutable, no-transform, max-age=31536000 so that after one request images will be served from the CDN. You can add another query parameter if you need to bust a cache.

If you want the image content to get regenerated more often use a shorter max-age.

For more information see the Dynamic Mini App Embed images docs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published