擅长:python、mysql、java
<p>不过,我没有这方面的经验,<a href="https://pypi.python.org/pypi/picopt/" rel="nofollow noreferrer"><strong>^{<cd1>}</strong></a>看起来很全面。它广泛地依赖于外部工具来执行优化,因此可能很难在受限或托管的服务器环境中设置。</p>
<p>除此之外,试试谷歌搜索“python图像优化”。还有一些其他链接表明,基于PIL的解决方案可能是可行的,例如:</p>
<ol>
<li><a href="https://stackoverflow.com/questions/10607468/how-to-reduce-the-image-file-size-using-pil">How to reduce the image file size using PIL</a></li>
<li><a href="https://stackoverflow.com/questions/10970864/image-optimization-google-app-engine-with-python">Image Optimization (Google App Engine with Python)</a></li>
</ol>