Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Jonjie's avatar
Level 12

Is the quality of image depends on resize in Image Intervention?

I'm thinking if the quality of the image depends on the resize() method in Image Intervention? Or maybe there's an option where I can set the quality of the image? Please see my code below.

$image->resize(800, 800, function($constraint){
	$constraint->aspectRatio();
	$constraint->upsize();
});

// Upload image to filesystem
$image->save($tmp_file_path);
0 likes
1 reply
Tray2's avatar
Tray2
Best Answer
Level 73

When you save the image you can set the quality of the image. Not specifying the quality uses 90% of the source quiality.

Define optionally the quality of the image. It is normalized for all file types to a range from 0 (poor quality, small file) to 100 (best quality, big file). Quality is only applied if you're encoding JPG format since PNG compression is lossless and does not affect image quality. The default value is 90.

http://image.intervention.io/api/save

2 likes

Please or to participate in this conversation.