Best Ways To Optimise Website Images - Blog - eCommerce website technology

优化网站图片的最佳方法

Images are essential for every website. They help sell your products or services, share information, help with navigation and make your website appealing to use. Unfortunately, they also use a lot of downloading bytes, which can cause your website loading time to be very slow. 

网站加载速度慢不仅可能导致搜索引擎排名降低,还会增加跳出率,因为访客会在网站加载完成之前点击访问其他网站。

但是,在图像文件大小和类型方面,您完全掌握着主动权,这叫做图像优化。

什么是图像优化?

图片优化包括两件事:在不降低图片质量的前提下缩小图片文件大小,以保持页面加载时间短;以及利用图片 SEO 让图片在搜索引擎中获得高排名。

要获得优化的图像(高质量、小文件大小的图像),必须满足以下四个主要条件:

  • Image height and width
  • 图片文件名
  • Image compression level
  • Image file size, which is controlled by the image type

为什么图像优化很重要?

图片文件通常很大,这意味着在用户打开新网页时,需要一些时间才能下载到用户的设备上。页面加载速度越慢,网站性能就越差。因此,谷歌经常会因为网站加载速度慢而降低其搜索排名。网站访问者也不喜欢加载速度慢的网站,因此他们会点击跳转到其他网站。

通过优化图像, 好处 you can expect include:

  • Faster loading speed 速度越快越好。如果超过两秒,访客就会转向其他地方。
  • 提升用户体验 - visitors expect instant page loading and when they receive it, they are likely to find the site enjoyable to use and engage for longer.
  • 提升搜索引擎排名 - Google gives both text and image results in search results. People also search for specific images. Optimised images are ranked higher over those which are not.

如何优化网站图片

要优化图片,您必须做三件关键的事情:

1. reduce the image size

Reducing image size refers to both the height and width and amount of file space the image takes up. To reduce the image width and height, this is best done before uploading to your website. Use your judgement in determining how large you need your image to display on your website. Remember that height and width is related to the page view once it is open on the visitor's device.

要减小图像文件大小,您需要对其进行压缩。图像压缩可以通过一系列付费和免费的在线或可下载软件来实现,包括:

  • TinyPNG 如果您需要缩小 PNG 图片,TinyPNG 是个不错的选择。它不仅免费,还能帮您处理半透明图片。
  • JPEG 减焦器 – 一种无需下载任何软件即可优化 JPEG 文件的免费方法。
  • Photoshop – 如果您需要进行大量的图像编辑,那么这款软件非常值得购买。
  • GIMP – 免费版的 Photoshop。

2. 请使用正确的图像文件类型

网络中使用的图像文件主要有三种类型:GIF、JPEG、PNG。

  • JPEG是网站上最常用的图像文件格式,主要用于照片,因为它可以很好地缩小文件大小而不会损失太多质量。但它不适合线条图、徽标或图形,因为使用这些格式的图像看起来会比较像位图。

  • GIF has a small colour range, so is not used for photos but can be used for animations. Images can be compressed using GIF, but not as small as a JPEG.

  • PNG 文件非常适合用于网站上的徽标或线条图,因为它们压缩后不会将图像转换为位图。但对于照片来说,PNG 文件并不理想,因为它们无法像 JPEG 那样压缩到最小。

请勿使用 TIFF 或 BMP 格式保存图片,因为文件过大。也请勿使用 PDF 格式保存图片。即使您的设计师提供了这种文件类型,它也仅适用于印刷,无法在网站上以您希望的方式呈现在内容中。

3. use descriptive and accurate file names

使用真实单词而非一串数字或字母作为文件名,可以让搜索引擎识别文件内容,从而进行索引。例如,一张黄色花朵的图片,最佳文件名应该是 yellow-flower-in-meadow.jpg,而不是 3hdfs93q.jpg。

如需更多图像优化技巧,请查看我们关于……的文章 using web images correctly 和 调整网页图片大小. 

Tags: 网页设计  

Posted: Thursday 15 December 2016

Comments

    No messages found!