我正在做优化,谷歌建议对图像进行无损压缩,寻找一种在 Django 中实现这一点的方法。
这是他们指定的图像,我认为要有效地完成它需要在系统范围内实现,可能使用中间件类想知道是否有人以前做过。这是页面速度的谷歌分析链接https://developers.google.com/speed/pagespeed/insights/?url=www.kenyabuzz.com
优化图像 正确格式化和压缩图像可以节省许多字节的数据。优化以下图像,使其大小减少 627.3KiB(减少 74%)。
Losslessly compressing http://www.kenyabuzz.com/media/uploads/clients/kenya_buzz_2.jpg could save 594.3KiB (92% reduction).
Losslessly compressing http://www.kenyabuzz.com/media/uploads/clients/new_tribe_2.jpg could save 25KiB (44% reduction).
Losslessly compressing http://www.kenyabuzz.com/…a/uploads/clients/EthiopianAirlines2.jpg could save 3KiB (22% reduction).
Losslessly compressing http://www.kenyabuzz.com/static/kb/images/Nightlife.Homepage.jpg could save 1.3KiB (2% reduction).
Losslessly compressing http://www.kenyabuzz.com/static/kb/img/social/blog.png could save 1.1KiB (43% reduction).
Losslessly compressing http://www.kenyabuzz.com/static/kb/img/social/twitter.png could save 969B (52% reduction).
Losslessly compressing http://www.kenyabuzz.com/…der-Board---Email-Signature--Neutral.jpg could save 920B (2% reduction).
Losslessly compressing http://www.kenyabuzz.com/static/kb/img/social/youtube.png could save 757B (31% reduction).