dimanche 27 mars 2016

Laravel Intervention image with imagick driver resizing into small image gives large file size

I am resizing large images on my project to create thumbnails. Here is one example:

Original Image (1160 x 773): Original Image (1160 x 773)

Thumbnail (400 x 266): Thumbnail (400 x 266)

The problem is, the large image is 732kb which is I think understandable since it's size is big, but the second image is still 573kb.

Is this normal or is there something wrong?

Here is my code for resizing:

\Intervention\Image\Facades\Image::make($originalPath)
    ->resize($resized_width, $resized_height, function($constraint){
        $constraint->aspectRatio();
        $constraint->upsize();
    })
    ->save($thumbnailPath, 85);



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire