Search code examples
symfonyliipimaginebundle

Filtered image is bigger than original image in file size - LiipImagineBunle


My goal is to generate an image from one original uploaded image. I am using the built-in relative_resize filter of LiipImagineBundle.

The configuration of the bundle:

my_filter:
     filters:
        relative_resize: { widen: 960 }

Let's say : for an image filename image.jpeg that is 1280*850, I am having an additional filtered file b_image.jpg.The problem is that b_image.jpg, which is 960*640 is way bigger in file size than image.jpg.

Do you have any suggestions regarding how to debug this issue?


Solution

  • I have no suggestion to how to debug this issue, but I suggest to use quality options in your filters. Just try many options and watch the results.

    One of my nice filter:

    my_filter:
            quality:              70
            jpeg_quality:         70
            png_compression_level: 9
            png_compression_filter: ~
            format:               jpg
            filters:
                auto_rotate: ~
                thumbnail: { size: [960, 1500], mode: inset }
                strip: ~
                interlace:
                    mode: plane