How can a theme reference the content directory? Or can there be site-specific 'assets'?

Hi, I’ve been trying to make a theme where it’s expected that the end-user uploads some assets (say, a hero video, custom js data, or images used for design elements like a background) into the site’s content directory (e.g. within a ‘content/images/custom’ directory). Is there a way to properly reference this from the theme for access that won’t encounter issues with caching?

I’ve already tried direct references (e.g. just pointing straight to things uploaded in the content directory before (e.g. ‘content/images/theme-related-user-image.jpg’), and noticed things going wrong where if the end-user asset gets updated the old one may still display due to caching.

Alternatively, is there a concept of having a site-specific assets folder that can be used alongside theme’s own assets folder / use the {{asset}} helper? I’ve tried reading through the documentation, seen some older references to things like an admin assets folder.

For the moment I’ll assume the next best thing is to use {{img_url}} (e.g. {{img_url ‘content/images/theme-related-user-image.jpg’}} ) but it still doesn’t quite feel like the right thing to do. Feel like a more generic handlebars helper for calculating urls of content items (without image-specific options) is needed.

It sounds like you might be looking for the {{asset}} helper - which you mentioned above, but it looks like you linked to a different page with a confusingly-named similar title (will take a look at fixing that)