aspendigital/oc-resizer-plugin

How to change _resized folder path?

Closed this issue · 2 comments

I used this to make thumbnail of a file in media folder:
$imagePath = smartResize($this->thumb, 300, 200);
The result is a thumb in media folder under _resized folder, but I want to change this folder path, to be in uploads folder instead, to be safe from user deletion. How can I change this?

The way it works currently, resized images are saved to the same Laravel disk-- media or uploads-- as the source image. I'll have to think about it, but I'm not sure if that's something that needs to be changed. It would be a pretty simple customization in ResizeService:: fileThumbInfo() if you wanted to do that for yourself though.

@mabehiry I've updated the config to change the default folder name to .resized, which is by default hidden in the media library. Although it's not a move to the uploads folder, I believe this should take care of your concern.