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

Image resizing issue #610

Closed
Iamscalla opened this issue Jul 15, 2017 · 3 comments
Closed

Image resizing issue #610

Iamscalla opened this issue Jul 15, 2017 · 3 comments

Comments

@Iamscalla
Copy link
Contributor

attempting to use the image library to resize, i get response "imageProcessFailed"
bu
below is the code used.

`if ($file = $this->request->getFile('event_image'))
{
if ($file->isValid() && ! $file->hasMoved())
{
$path = FCPATH.'static/eventimg';
$filename = 'event_image-' .$file->getRandomName();
$file_full_path = $path . '/' . $filename;
$file->move($path, $filename);

							$image = \Config\Services::image('imagick')
							        ->withFile($file_full_path)
							        	->resize(800, 300, true)
							        ->save(FCPATH.'static/eventimg/small/mypic_thumb.jpg');
							
		        	}`
@InsiteFX
Copy link
Contributor

You have a single quote before the first if statement is that a mistake?

@lonnieezell
Copy link
Member

That error happens when attempting to call ImageMagick using the exec function here. This could be any number of things. Checking your system's error records is the best thing to do. These other steps could help:

  1. Verify the path to ImageMagick's convert command is set correctly in application/Config/Images.
  2. Check the server error logs
  3. Ensure exec is enabled on your server.

@Iamscalla
Copy link
Contributor Author

yea I figure that out, using Gd handler in main time pending when I get it fixes from my end

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

3 participants