I set in asset.php config 'autorender' => false (it's suitable for me in most cases).
But I encountered with problem. When I do this <?=\Asset::img('/path/to/img')?> in my view, I have the error: "Asset_instance could not be converted to string".
Is there a way to render image with Asset class in this mode (autorender => false)?
I've solved this problem otherwise. Extend and replace Asset_Instance for make his img method always rendering when it does not use the groups. I think this behavior is preferential.
In fact, I didn't want to disable auto rendering, but I wanted to cut notation of this: \Asset::forge()->js(array(...), array(), '_default_')->css(array(...), array(), '_default_');
to this: \Asset::forge(()->js(array(...))->css(array(...));
Unless you're hardcoding your pages, normally you would always use a group. We use two for css ('header-first' and 'header-last') and four for js (header and footer, and for both first and last).
And they are rendered in our page template, first before last (so you can control the fact that some js files need to be loaded before others, like jquery of bootstrap files).