steirico / kirby-plugin-image-crop-field

Kirby image crop field based on vue-cropperjs and gumlet/php-image-resize
MIT License
15 stars 3 forks source link

User account images are saved in the wrong folder #6

Closed philipmarnef closed 4 years ago

philipmarnef commented 4 years ago

The cropped image filepath is lowercased in fields/CroppedImage.php, but user accounts folders are case-sensitive. As a result they end up in a new folder.

What is the reason for lowercasing the path?

steirico commented 4 years ago

Well, I investigated the way how directory names in content and media are generated from a page's title. I concluded that str::slug() is involved which leads to lower case paths. That was the reason for the lower case in the mentioned code.

I see your point and I can confirm that user folders in media are mixed case.

So this issue indeed arises when using the plugin in user blueprints.

steirico commented 4 years ago

@philipmarnef: Give a try to branch bug/lower-case-paths.

It should fix this issue.

philipmarnef commented 4 years ago

Just checked out the branch and can confirm it resolves the issue. Thanks.

steirico commented 4 years ago

Good hear. Thanks for testing!

steirico commented 4 years ago

Fixed in c933c8403b7a20579474234b819499e587ebd5e5