Is Assetmanager Good For Preventing Direct Access To Images ?

I have this user directory that contains all my user’s profile pictures.

When I use the image tag, it points to that user directory. If someone

wants to access that image using the direct link, they can. I want to

prevent them from being able to access an image directly. Can I use the

asset Manager in yii to make that happen or what I need is a totally

different thing ?

AssetManager is to publish files that are somewhere in a protected folder to web directory. They are then always public until you clear the asset directory.

I don’t think it is usefull in your situation.

You may use sendFile

or xSendFile for this.