liip想象捆绑包创建所有相同文件大小的缩略图

We are using Symfony2 and the LiipImagineBundle to create thumbnails of user uploaded content.

Every thumbnail is exactly 161kb, no matter how much or how little it has in the image.

Here is my config file for liip:

liip_imagine:
    resolvers:
        default:
            web_path: ~
    filter_sets:
        my_thumb:
            quality: 75
            filters:
                thumbnail: { size: [80, 80], mode: outbound }
        productvariant_preview:
            filters:
                resize: { size: [450, 450] }
        productvariant_thumb:
            filters:
                resize: { size: [292, 292] }
        productvariantdesign_thumb:
            filters:
                resize: { size: [231, 231] }
        profiledesign_thumb:
            filters:
                resize: { size: [200, 200] }
        asseenindesign_thumb:
            filters:
                resize: { size: [158, 158] }
        homepage_slider:
            filters:
                resize: { size: [922, 388] }
        homepage_featuredlink:
            filters:
                resize: { size: [450, 260] }
        homepage_secondaryfeaturedlink:
            filters:
                resize: { size: [294, 188] }
        homepage_productvariantdesign:
            filters:
                resize: { size: [223, 223] }
        printcolor_thumbnail:
            filters:
                resize: { size: [30, 30] }

Resize Filter:

namespace Imagine\Filter\Basic;

use Imagine\Filter\FilterInterface;
use Imagine\Image\ImageInterface;
use Imagine\Image\BoxInterface;

/**
 * A resize filter
 */
class Resize implements FilterInterface
{   
    /**
     * @var BoxInterface
     */
private $size;
private $filter;

/**
 * Constructs Resize filter with given width and height
 *
 * @param BoxInterface $size
 * @param string       $filter
 */
public function __construct(BoxInterface $size, $filter = ImageInterface::FILTER_UNDEFINED)
{
    $this->size = $size;
    $this->filter = $filter;
}

/**
 * {@inheritdoc}
 */
public function apply(ImageInterface $image)
{
    return $image->resize($this->size, $this->filter);
}
}

Thanks!

I don't 100% know what was happening but adding

driver: imagick

fixed the issue.