在Drupal 7中更改JPEG质量(GD工具包)后对现有图像的影响(Effect on existing images after changing JPEG quality (GD toolkit

编程入门 行业动态 更新时间:2024-10-14 08:30:21
在Drupal 7中更改JPEG质量(GD工具包)后对现有图像的影响(Effect on existing images after changing JPEG quality (GD toolkit) in Drupal 7)

在我们的包含数千张图片的Drupal 7网站上,GD工具包中的JPEG质量设置为100%。

如果使用“图像样式”代替“原始图像”,这会导致图像质量优化150-200%。 但我们需要使用样式来保持图像比例一致。 对于跨浏览器的原因,CSS'object-fit'不是一个选项。

如果我们将质量降低到60%,现有图像的质量会发生什么变化?

更新 :据我测试,它不应该对现有的图像有任何影响

On our Drupal 7 website with thousands of images, JPEG quality in GD toolkit was set at 100%.

This caused well-optimized images to be 150-200% larger if 'image styles' were used instead of 'original images'. But we need to use styles to keep images ratio consistent. CSS 'object-fit' is not an option for cross-browser reasons.

What will happen to the quality of existing images if we reduce quality to 60%?

Update: As far as I tested it should not have any effect on the existing images

最满意答案

(新)图像样式图像(缩略图)如果未找到旧图像样式图像(缩略图),则会生成新图像样式图像 每次显示缩略图都没有意义,因为它需要太多的服务器/资源。

如果您想要重新生成一些缩略图,则只需删除缩略图文件即可。 下一次它被称为它会再次生成。

还有一个模块: https : //www.drupal.org/project/imagestyleflush

查看该主题以查看其他选项:

https://drupal.stackexchange.com/questions/12864/rebuild-images-from-image-style

(New) image style image (thumbnail) is generated if old one is not found. There is no point of re-generating thumbnails every time they are displayed since it would required too much server/resources.

If you want some thumbnail regenerated it should be enough to just delete thumbnail file. Next time it's called it will be generated again.

There is also a module for that: https://www.drupal.org/project/imagestyleflush

Check on this thread to see other options:

https://drupal.stackexchange.com/questions/12864/rebuild-images-from-image-style

更多推荐

本文发布于:2023-08-07 00:14:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1456564.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:工具包   图像   质量   GD   JPEG

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!