this part of your application is protected by .htaccess, and you can’t simply access it by web browser. You can add to a controller new action that display images and use url to this action as src tag.
use CAssetManger publish your protected image file to the public folder, then you have the public path
which can be used for the img element , <img src='assetUrl ’ …
if your image folder 's content is often changed ,this is not a good way ;
there is a powerful class library you can use : WideImage (symfony also use it as image library ),it is
the best GD wrapper class ,you can use it do almost every thing GD can do ; if you use this class
render you image file (which can be from every where only if you php can access it ) is very easy:
WideImage::load($yourFilePath)->resize(500, 300)->output('jpg', 90);// only one line <img src='http://www.yiiframework.com/forum/public/style_emoticons/default/laugh.gif' class='bbc_emoticon' alt=':lol:' />
you can use this class directly , as an 3rd library just like zend . here is the project address :
[url="http://wideimage.sourceforge.net/examples/output-to-browser/"]wideimage in sourceforge [/url]
and there also has a extension in repo :ewideImage