[eluser]kilishan[/eluser]
[quote author="Basketcasesoftware" date="1303774387"]In the Assets class you create functions for locating css and js files, but nothing for other media, even though you have an 'image' category in one of your arrays.
I added a quick function to the Assets class but it's a hack. It would be better if it was using the find_files function. Here's the code that I placed immediately after the Assets::image() function.
Code:
public static function image_path($image=null)
{
if (empty($image)) return '';
return(self::$asset_url . self::$asset_base . self::$asset_folders['images'] .'/'. $image);
}
[/quote]
Yeah, the images portion of the assets is under-developed at the time. In time, I'd like to make it handle image resizing based on location, as well as make it simple when you have to change your media from a local server (like under media.myserver.com) to residing on a CDN like Amazon S3. Obviously, not there yet.
You could use the find_files function if you want the image to be able to be overridden by child themes, or potentially exist in the default theme, but not in the child theme and still be found. If you don't need that ability, then there's no need for the find_files method to be called. It's faster without using that function anyway, but once things get cached, it doens't make a difference anymore.
So, it all depends on the type of site you're creating, I guess.