asp.net - 调整图像大小和性能

标签 asp.net performance image browser resize

我有一个大约 1200 x 400 的图像(如果我没记错的话),大小约为 50kb。我在网站的标题中使用图像,但我将图像的高度限制为 100 像素,以使其适合我的标题。

<asp:Image ID="imgLogo" runat="server" ImageUrl="~/Images/AFact.jpg" Height="100px" />

这是一种不好的做法吗?是不是说把图片完整下载到客户端,然后客户端的浏览器就得浪费cpu来调整大小?使用 Photoshop 将图像缩小到我想要的高度会更好吗?

最佳答案

Is this a bad practice? Does it mean that the image is being downloaded in full to the client, and then the client's browser has to waste cpu to resize it? Would I be better off to scale the image down to the height that I want it at by using Photoshop?



对你所有的问题都是肯定的。

关于asp.net - 调整图像大小和性能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/890629/

相关文章:

html - 背景图像上的图像闪烁

asp.net - css文件更新版本的最佳解决方案是什么

asp.net - 如何将内置的网站程序包MS部署到原始IIS网站

css - 尝试将 telerik 控件置于 Bootstrap 弹出窗口的中心

performance - 通过减少 for 循环数量来加速

image - 使用docker build输出信息

reactjs - 未处理的拒绝 (TypeError) : _nbind. externalList[num].dereference 不是函数

asp.net - 如何在asp.net中获取服务器日期/时间

c# - 修改appSettings时性能不佳

java - 如果线程安全不是问题,Java 中的 ArrayList 与 Vectors