Search code examples
yii2yii2-basic-appyii2-extension

Yii2 Noam Image manager save outside web folder


I use noam image manager for my yii2 app https://github.com/noam148/yii2-image-manager

and in the components , they told me to put this

'components' => [
    'imagemanager' => [
        'class' => 'noam148\imagemanager\components\ImageManagerGetPath',
        //set media path (outside the web folder is possible)
        'mediaPath' => '/path/where/to/store/images/media/imagemanager',
        //path relative web folder to store the cache images
        'cachePath' => 'assets/images',
        //use filename (seo friendly) for resized images else use a hash
        'useFilename' => true,
        //show full url (for example in case of a API)
        'absoluteUrl' => false,
    ],
],

and i tried so many times to make the extension create folder outside the web folder , and always not working , can somebody help me on this ?


Solution

  • i found the way to move the target , all you have to do is make link shortcut in config files, and use it in params file , and also you can modified the model in the composer files directly