Support the ongoing development of Laravel.io →
Input Database Packages

I am trying to manipulate images in Laravel using intervention.

I have followed all the required set up to use imagick. I use vagrant with centOS and it all shows everything is working as it should via phpinfo ();

When I run the following (snippit from the controller)

public function store()
{
	//Get all the user fields 

	$user = new User;
	
	$user->username = Input::get('username');
	$user->name = Input::get('name');
	$user->email = Input::get('email');
	$user->gender = Input::get('gender');
	$user->country = Input::get('country');
	$user->website = Input::get('website');
	$user->bio = Input::get('bio');

	//Check for and store user image

	if (Input::HasFile('image'))

	{
		$image = Image::make(Input::file('image'));
			
		$name = time() . '-' . $image->getClientOriginalName();

		$image->resize(100, 100);

		$image = $image->move(public_path() . '/images/avatars/', $name);

		$user->image = $name;


	}

	$user->save();

	return redirect('/admin/users');

}

It does everything I expect but resize the image. It get the image from the Input, assigns the new name and saves it in the right place. When I view it on the page it is simply the original size.

It does all this without error, so I am unsure whether the issue is with my code or on the server side.

Any help appreciated.

Last updated 3 years ago.
0

Dammit, it was server side, the memory set on vagrant was the issue, i.e not enough of it!

0

Sign in to participate in this thread!

PHPverse

Your banner here too?

SCC-Lee scc-lee Joined 22 Oct 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.