Crop already exists
greal opened this issue · comments
Hello!
After creating the preview, the error is:
Croppa: Crop already exists at cars/colors/599161845b2c3-100x_-resize.jpg. You probably have a misconfiguration. Make sure that the URL to your crop can be transformed by the
pathconfig to your
crop_dir.
Looked at the source code, and it looks like a flaw, for remote it should work without problems, but for local ones it will always be created. I have the default settings.
I removed the scan on the remote disk
if ($this->storage->cropExists($crop_path)) {
return $crop_path;
}
I do not know, maybe I'm not right, if that's how it is, please tell me how it's needed.
Hi
I have the same issue. Because cropsAreRemote()
is returning false as I'm running with local filesystem.
I don't get why there is this part
// If the crops_dir is a remote disk and if the crop has already been
// created. If it has, just return that path.
if ($this->storage->cropsAreRemote()
&& $this->storage->cropExists($crop_path)) {
return $crop_path;
}
IMO we shouldn't check $this->storage->cropsAreRemote()
every time
Check if the symbolic link of the storage has been created! If it's not the case run : php artisan storage:link
Everything seems to work but I get this error sporadically. I am using local crops and S3 originals.
as I mentioned in #157 aswell, if this would be fixed the scenario where you want to use storage_path() instead of public_path() would work too.
Any update on this?
@jordanade I believe this project is not maintained anymore (unfortunately!). There are 2 PRs which could solve this, but the maintainer seems to be out of town for a while.
The new version 6 was just released.