You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chloe Lin [SSW] edited this page Feb 17, 2026
·
1 revision
This middleware is only used in development mode to handle images for TinaCMS. During development, image requestes from /uploads/rules/ are proxied to local files so TinaCMS works as expected.
What it does
Watches requests to /uploads/rules/* (e.g. .jpg, .png, .gif, .webp, .svg).
When such a request is detected, it rewrites the URL to /api/local-images/....
This means images are served directly from the local content repo instead of production assets.
Why it’s useful
Lets TinaCMS display and edit images while working locally.
Prevents conflicts with the site’s regular static assets.