2 Star 0 Fork 0

mirrors_jsantell / 2013.cascadiajs.com

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
automate-your-responsive-images.md 1.92 KB
一键复制 编辑 原始数据 按行查看 历史
Shawn Jansepar 提交于 2013-08-10 12:03 . Small fixes

Automate Your Responsive Images

##Abstract

Responsive images represent one of the biggest sources of frustration among the web development community — and with good reason too; the average page size has grown from 1MB to a staggering 1.5MB in the last year alone. Much of that page weight could be reduced if images were conditionally optimized based on device widths, pixel density and modern image formats (such as WebP). The question is, what is the best workflow for optimizing our images?

The <picture> element is currently the frontrunner for replacing the <img> element because it allows developers to specify different images for different device conditions in order to solve both the performance and art direction problems. However, the <picture> element introduces a whole new problem: developers must now generate a separate asset for every image at every breakpoint. What developers really need is a solution that automatically generates smaller images for smaller devices from a single high resolution image. Ideally, this automatic solution would only make one request per image and would be 100% semantic and backwards compatible.

This solution is possible using Mobify.js. Its Image API will automatically resizes and compresses <img> and <picture> elements, and can do so without needing to modify a single <img> tag in your existing backend markup through the use of Capturing (an API in Mobify.js that allows for modification to the DOM before any resources have loaded).

##Speaker Bio

jansepar

I am a software engineer and dev lead on the Product Team at Mobify, where I get to hack both on the front-end and back-end with a heavy focus on the user experience. When I'm not hacking, you likely find me playing hockey/video games, eating donairs, or travelling.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_jsantell/mirrors_jsantell_2013.cascadiajs.com.git
git@gitee.com:mirrors_jsantell/mirrors_jsantell_2013.cascadiajs.com.git
mirrors_jsantell
mirrors_jsantell_2013.cascadiajs.com
2013.cascadiajs.com
master

搜索帮助