Note: This approach is not officially supported by the core team. It reflects how some teams are currently achieving grouped content and media. Use at your own discretion.
By default, TinaCMS expects:
content/
public/uploads/
This setup works in many modern web frameworks (like Next.js, Astro, etc.) where static assets are served from a public directory, but it breaks co-location ā your content and related assets live in different locations.
This adds friction when managing, duplicating, or migrating content.
The current way to solve the issue is to store both markdown and static assets in public/uploads
.
Say you want to build a blog with posts, your file structure for the content would then look like this:
public/āāā uploads/āāā posts/āāā post-a/ā āāā index.mdā āāā image.png
Note:public/uploads
is the default Media folder, you can change it to be whatever suits your project.
See this for more information: Repo-based Media
The only thing required to make this work is to update the path
in your Collection file to point to the Media folder.
//tina/collections/post.tsconst Post: Collection = {label: "Posts",name: "post",path: "public/uploads/posts",fields: [//...],//...};
public
gets copied to your build outputFor projects using TinaCMS with modern frontend frameworks, keeping markdown and media together simplifies everything from authoring to deployment.
With the approach described here you get:
If you want to see other viable options, have a look at that video:
Got a different setup that works for you? Let us know!