o2team / athena

O2前端流程工具

Home Page:https://athena.aotu.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

athena 会考虑添加 webp 格式转换功能吗?

leeenx opened this issue · comments

最近使用 athena 的 合并雪碧图功能,突然爱上了这个功能。在想,athena 如果可以把 webp 转换的功能也加上去就好了。可以使用 ?__webp 的参数功能来实现。

例如:

img{background-image: url(1.png?__webp);}

雅典娜帮我自动把 1.png 转化成 1.webp,然后再把上面的代码转生成:

img{background-image: url(1.png);}
.webp img{background-image: url(1.webp);}

这样子我可以结合 js 做 webp 支持判断,如果支持在 html 的 root 节点上添加一个 webp的类名。

考虑加入迭代~