我正在使用Symfony 4.2和Liip Imagine捆绑包。我有一个这样的过滤器:
live_feed_message:
jpeg_quality: 40
png_compression_level: 9
filters:
relative_resize:
widen: 1024
但如果发送的图像小于1024px,则会调整为1024px。
我想一个过滤器,调整大小的图像只有的情况下,图像更大。
我搜索了一下,没有找到任何解决方案。有人有这个问题吗?
谢谢你的帮助
1条答案
按热度按时间ojsjcaue1#
好吧,我找到解决办法了。我已经试过了,但我认为不正确。现在起作用了不使用
relative_resize
过滤器,而使用downscale
过滤器。文件:
The built-in downscale filter performs sizing transformations (specifically image down-scaling). This filter exposed a number of down scale options which may be used to configure its behavior.