Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving Image Doesn't Work #44

Open
hlaporthein opened this issue May 10, 2018 · 4 comments
Open

Saving Image Doesn't Work #44

hlaporthein opened this issue May 10, 2018 · 4 comments

Comments

@hlaporthein
Copy link

I would like to save image in a directory from public folder in laravel 5.6. So, I used the code as documentation did like below.

$orginal_path = $request->file->store( 'cropped', 'public' );

$medium = Image::make($orginal_path,array(
	'width' => 300,
	'height' => 300,
	'grayscale' => true
))->save($orginal_path);	

I added true for image.php from config directory.

'write_image' => true,

Did I miss anything?

@WKoppenol
Copy link

WKoppenol commented May 25, 2018

I'm experiencing the exact same issue. Everything is set up properly as far as I can tell. The library works, just the caching does not. I may dive in this later if there's no fix incoming any time soon.

Edit: I did just get something to work when supplying the write_path, but not when leaving it empty.

@WKoppenol
Copy link

WKoppenol commented Jul 24, 2018

Unfortunately I'm still experiencing issues with this. Is this project abandoned? I'm trying to use the image library for another part of my website now but it will not write images to the cache, nor will it serve the image when I tell it not to use the cache, so it seems completely broken?

Edit: For now I managed to resolve the situation by editing the library and checking the paths along the way. In the end it was because I didn't supply the correct relative path to the library to process. I'm now passing the path relative to the public folder (so images/some/folder/image.png), that'd also write the file to cache. Make sure permissions/ownership (www-data) is set correctly to the cache folders. I'd have liked if it complained a bit more if a passed URL was incorrect, I now had to dig in the library and figure out by hand step-by-step where it failed.

@poldixd
Copy link

poldixd commented Jan 22, 2019

any updates on your issue?

@Wotuu
Copy link

Wotuu commented Jan 22, 2019

Unfortunately no, I've stopped using this library actively, I didn't really need it that much anyways. It's still in there but I don't think it does much anymore. Hope you get your issue sorted though! It helps to meticulously check your settings and file permissions. Good luck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants