web图像

Images are an essential ingredient of most websites. The visual quality of pictures has a direct impact on the brand image and the message those images convey. And the weight of images usually accounts for a 40-60% of the data transferred on the web.

图片是大多数网站的重要组成部分。 图片的视觉质量直接影响品牌形象以及这些形象传达的信息。 而且图像的重量通常占网上传输的数据的40-60%。

This usually has the largest impact on loading time over other resources like JavaScript. So, whether we're creating or running a website, we should put in place an image transformation and optimization pipeline.

与其他资源(例如JavaScript)相比,这通常对加载时间有最大的影响。 因此,无论是创建网站还是运营网站,都应该建立图像转换和优化管道。

There are many options to do this, from in-house developments based on open source libraries and suites – like ImageMagick – to cloud-based tools and APIs.

从基于开源库和套件的内部开发(例如ImageMagick)到基于云的工具和API,有很多选择。

Whatever tool we use in our deployment, there are four main tasks that, at the very least, any pipeline should accomplish.

无论我们在部署中使用什么工具,至少有四个管道都应完成四个主要任务。

调整图像大小。 (Resize images. )

Image resizing is the first and most important step. It brings a big impact on weight with no visual quality penalty, as long as we don't make it smaller than the displaying resolution.

调整图像大小是第一步,也是最重要的一步。 只要我们不使其小于显示分辨率,它就会对重量产生重大影响,而不会影响视觉质量。

We should always set and enforce a maximum image resolution in our website, for instance 2000 px width. Ideally, we'd make our website responsive by setting different breakpoints and delivering images that fit in our users' displays.

我们应该始终在网站上设置并强制使用最大图像分辨率,例如2000 px宽度。 理想情况下,我们将通过设置不同的断点并提供适合用户显示的图像来使我们的网站具有响应能力。

If you need help on choosing your breakpoints, check out this article on the best image sizes for web.

如果您在选择断点时需要帮助,请查看有关适用于Web的最佳图像尺寸的本文。

转换为正确的格式。 (Convert to the right format. )

JPEG is the default format in the web. PNG may work better with graphic designs featuring solid colors, but in these cases it may yield lower weight with better quality.

JPEG是网络中的默认格式。 PNG在具有纯色的图形设计中可能会更好地工作,但是在这些情况下,它可能会产生重量更轻,质量更好的图形。

You may consider offering WEBP for Chrome, Edge, Firefox and Android users, keeping JPEG as fallback for Safari and iOS. It may save 10-30% of image weight with very similar quality, perhaps some more blur and less ringing.

您可以考虑为Chrome,Edge,Firefox和Android用户提供WEBP,而将JPEG作为Safari和iOS的后备。 它可以以非常相似的质量节省图像重量的10%至30%,也许更多的模糊和更少的振铃。

For an up to date revision you may check out this article on image formats for web.

有关最新版本,您可以查看有关Web图像格式的本文。

正确压缩图像。 (Compress images properly. )

We can do this with a powerful open source suite like ImageMagick and simply set a quality factor (typically 75 to 85) for JPEG (and WEBP) images. You can still use a perceptual metric to better protect quality and further squeeze weight – this is an option available in some cloud image optimization tools.

我们可以使用功能强大的开源套件(例如ImageMagick)来做到这一点,并且只需为JPEG(和WEBP)图像设置质量因子(通常为75到85)。 您仍然可以使用感知指标来更好地保护质量并进一步压缩重量-这是某些云图像优化工具中可用的选项。

摆脱元数据。 (Get rid of metadata. )

From shooting to editing, images accumulate metadata, like exif data. While they may be useful for editing and management purposes, they have no impact on how images show in our web. Their weight can easily get 20 KB or more per image.

从拍摄到编辑,图像会累积元数据,例如exif数据 。 尽管它们可用于编辑和管理目的,但它们对图像在我们的网络中的显示方式没有影响。 每张图像的重量很容易达到20 KB或更多。

We should get rid of metadata before publishing on the web. We only have to make sure that images are coded with the proper orientation and with a sRGB profile, adhering to good color management practices.

在网络上发布之前,我们应该删除元数据。 我们仅需确保以正确的方向和sRGB配置文件对图像进行编码,即可遵循良好的色彩管理规范。

翻译自: https://www.freecodecamp.org/news/image-optimization/

web图像

web图像_Web图像优化的基本介绍相关推荐

  1. 图像 pipeline_多面体优化,Pipeline与深度学习编译器

    有幸参与了MICRO2020,见识到了很多优秀的论文,其中最让我惊艳的是华为的在多面体优化上做优化的文章 <Optimizing the Memory Hierarchy by Composit ...

  2. 图像定位的优化、评价和应用简介

    图像定位的优化.评价和应用简介 1.预测图像位置的缺点 [1]回归位置不准确 [2]泛化能力不好 [3]目前算法只能预测单个实例 2.图像定位的优化 [1]先大后小 整张图片预测出关键点,然后再在预测 ...

  3. 全极化雷达遥感图像的迭代优化非局部均值去噪法

    文章提出了一种迭代优化的PolSAR的非局部均值去噪方法.该方法在每次迭代去噪过程中,通过同时考虑原始图像全极化噪声统计特性和前一次迭代所得影像的全极化信息来完善像素间极化相似性的度量,从而实现对影像 ...

  4. 图像显著性检测算法的评价指标介绍

    图像显著性检测算法的评价指标介绍 要评价一个图像显著性检测(Saliency Detection,SD)算法的好坏,当然离不开评价指标(Metric),显著性检测分为眼注视点显著性(eye fixat ...

  5. asp.net web开发框架_Web前端开发必不可少的9个开源框架

    大多数人想到Web开发时,通常会想到HTML或JavaScript,往往忽略了CSS,根据Wikipedia的说法,CSS既是网页中最重要也是最常被遗忘的部分之一,尽管它是万维网的三大基础技术之一. ...

  6. 毕业设计之 - 基于深度学的图像修复 图像补全

    1 前言 Hi,大家好,这里是丹成学长,今天向大家介绍 基于深度学的图像修复 图像补全 大家可用于 毕业设计 2 什么是图像内容填充修复 内容识别填充(译注: Content-aware fill , ...

  7. 风格迁移篇---重用鉴别器进行编码:朝向无监督的图像到图像转换

    文章目录 Abstract 1. Introduction 2. Related Work 3. Our NICE-GAN 3.1. General Formulation 3.2. Architec ...

  8. M×N扫描序列图像拼接、大视场图像拼接、全景图像拼接、2D网格拼图方法、累计误差消除(显微图像/航拍图像等)

    M×N扫描序列图像拼接.大视场图像拼接.全景图像拼接.2D网格拼图方法.累计误差消除(显微图像/航拍图像等) 前言 一.问题描述 二.拼接过程存在的问题 三.4种拼接算法介绍 1.搜索算法 2.最小生 ...

  9. 草地资源监测与智能分析系统(web端)与草伴侣APP介绍

    草地资源监测与智能分析系统(web端)与草伴侣APP介绍 今天查找草原监测的资料,不小心找到去年兰大老师给的PPT介绍资料,今天疫情隔离在家,就把这个"草地资源监测与智能分析系统" ...

最新文章

  1. R可视化绘制泊松分布(Poisson Distribution)
  2. 在Servlet中向客户端写Cookie信息
  3. 公司用的 MySQL 团队开发规范,非常详细,建议收藏!
  4. 操作系统(三十三)内存管理
  5. 动作基类 CCAction
  6. AngularJS入门心得2——何为双向数据绑定
  7. java 栈的变量_深入Java核心:JVM中的栈和局部变量
  8. 计算机网络学习笔记(14. OSI参考模型②)
  9. Python编程从入门到实践(基础入门)
  10. 数据建模工具存在的价值
  11. [文章]Android不流畅,究其本质
  12. C++ STL map插入效率优化
  13. 狂神学习系列04:MySQL+JDBC
  14. 你知道甲醛的危害有多大吗?
  15. html+css新手入门:圆角的使用方法详情,常见工作场景;
  16. Android屏幕压力,Android将逆袭桌面,微软压力巨大
  17. 网站客服系统_网页客服系统安装使用_GOFLY在线客服系统
  18. Excel自动生成sql建表语句
  19. 使用xenCenter启动虚拟机提示virtual disk could not be found
  20. 安全团队不可错过的 7 个开源工具

热门文章

  1. access、strtol函数的使用(后者为C库函数)
  2. 意外收获字节跳动内部资料,一篇文章帮你解答
  3. Java中key可以重复的Map集合:IdentityHashMap
  4. .net Core把一个list集合里面的所有字段的数值汇总
  5. Codeforces 408D Long Path (DP)
  6. Java后台与VUE跨域交接
  7. django-celery定时任务以及异步任务and服务器部署并且运行全部过程
  8. layou split 属性
  9. cas单点登录系统:客户端(client)详细配置(包含统一单点注销配置)
  10. 谈谈用SQLite和FMDB而不用Core Data