减少图像加载时间?
我想知道是否有其他方法来压缩我的图像或任何可以更快地加载页面/或幕后图像的脚本?
该网站的交互性很强,并且使用非常高质量的图像层作为主要布局。我已经在Photoshop中保存了Web设备并使用ImageOptim重新压缩,有些是jpeg,但大多数是png24以保持透明度,它们都是在CSS中设置的。
我已经尽可能地使用了jpegs和css精灵,但是有一个特别是树插图拉伸了整个站点的长度,这确实减慢了加载时间,是否有任何我可以进一步压缩这些图像或以不同的方式编码它们错过了? 任何帮助将非常感谢!
I was wondering if there is any other ways to compress my images or any script that would load the page faster / or the the images behind the scenes?
The site is very interactive and using very high quality layers of images for the main layout. I have already saved for web devices in Photoshop and re-compressed using ImageOptim, some are jpeg but the majority are png24 to maintain transparancy, they are all set in CSS.
I have used jpegs and css sprites where i can but there is one in particular of a tree illustration streching the full site length, that is really slowing up the loading time, is there any I could compress these images further or code them differently that I missed?
Any help would be great thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
你说你在狂奔。那很好。
您还可以使用 PNGcrush 等工具,它尝试通过删除元数据等内容来缩小文件。
您还应该发送远距离到期标头并在图像上使用缓存断路器,以确保在不必要时不会再次下载图像。
You said you are spriting. That is good.
You can also use tools such as PNGcrush which attempt to make files smaller by dropping things such as meta data.
You should also send far distant expiry headers and use a cache breaker on your images, to ensure the images won't be downloaded again if unnecessary.
在 Photoshop 中,选择文件->除了网络之外,您将能够找到尺寸和质量之间的最佳折衷方案。
In Photoshop, choose file-> save for web, you will be able to find the best compromise between size and quality.
您真的需要那里的透明度吗?某些浏览器不支持 PNG 透明度,即使在高端计算机上,页面处理也会变得密集且缓慢,具体取决于图像大小和图层数量。如果您可以展示您网站的某些内容,也许有人可以提供有关如何优化它的更多提示。
Do you really need the transparency there? PNG transparency is unsupported on some browsers and makes the page processing intensive and slow even on high end computers, depending on image size and quantity of layers. If you can show something of your site maybe someone can give more hints about how to optimize it.
如果您的 Web 服务器是 Apache,您可以使用 Apache 即时压缩它们。关于该主题的许多可用文章之一: http://www.samaxes.com/2009/01/more-on-compressing-and-caching-your-site-with-htaccess/
You can compress them on the fly with Apache if that's your web server. One of many available articles on the subject: http://www.samaxes.com/2009/01/more-on-compressing-and-caching-your-site-with-htaccess/