noam148 / yii2-image-manager

A Yii2 module/widget for upload and cropping images
MIT License
129 stars 61 forks source link

What path to use? #34

Closed UnbekanntesPferd closed 7 years ago

UnbekanntesPferd commented 7 years ago

Can someone tell me what is the expected value for mediaPath and cachePath? I tried a lot of different options here, but if I use something for mediaPath that is not the absolute path like /var/www/images the images will not be uploaded. But in this case the images aren't printed because this absolute path is also used as src in html...

noam148 commented 7 years ago

mediaPath need to be the the absolute file path on the server. It can also be a path outside your webroot. Only php needs read/write permission to this folder. So /var/www/images is correct. mediaPath is the path where image-manager store his original images.

cachePath is the path where the image-manager store al his thumbnails. it need a relative path in you webfolder. So if your site is www.example.com/assets/image with the folder assets/image in the webroot and thats the location where you want to store the images. cachePath need to be 'assets/images'

UnbekanntesPferd commented 7 years ago

Perfect. Thank you for the explanation, it works now! :)

noam148 commented 7 years ago

You're welcome!