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

こ雲淡風輕ζ 提交于 2020-01-06 19:52:52

问题


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?


回答1:


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


来源:https://stackoverflow.com/questions/37596907/filtered-image-is-bigger-than-original-image-in-file-size-liipimaginebunle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!