In the meantime this ability has been introduced (I don’t know when it was added). To make use of it, you have to add a “vendors” folder with the subfolders “css”, “img”, and “js” to your plugin:
app plugins myplugin vendors css img js
Files in those folders can then be accessed like http://example.com/myplugin/img/my_image.jpg.
<?php echo $html->image('my_image.jpg'); ?>
will create this HTML code:
<img src="/img/my_image.jpg" alt="" />
As you see, the path points to the “img” folder of your application, and not to the “img” folder of your plugin. To avoid this, we have to specify the full path to the image:
<?php echo $html->image('/'.$this->plugin.'/img/my_image.jpg'); ?> // creates: <img src="/myplugin/img/my_image.jpg" alt="" />
Happy plugin baking :)
PS1: A new “notEmpty” validation rule has recently been added (“teknoid” was faster with an article, so here just a link to his article).