Image optimizations

未关闭
#515 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
20/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
docker, html, java

调研方向

Start by comparing the two approaches described in the issue: generating optimized images during extension publishing or serving them through an image-optimization service. Then trace the publishing flow and homepage extension-icon rendering to identify where the chosen approach belongs. Done means extension icons are resized or served in modern formats without unnecessarily downloading large originals; the issue does not specify an implementation or tests.

由索引模型根据 Issue 内容生成。

描述

enhancement priority:low webui

Although the images that we use in our Web UI are all SVGs and all very tiny, the user-submitted extension icons tell a different story.

This story is a horror story recounting extensions like the Vim extension which have huge icons, in Vim's case 200Kb! Having high-quality icons is something I like and can be useful to display in certain places, but on our home page, where these icons get loaded automatically for everyone, downloading megabytes of them is not really something desirable.

Optimizing these icons via resizing and using modern web image formats can make a real difference (this is a test from the homapage of Open VSX with the 25 dev environment extensions:

Current Optimized (128x128 images)
image image

We could achieve optimization like this via two different approaches:

  • generating alternative images ahead of time
  • optimizing "on the fly"
    • we can use something like Weserv to our Docker image, which can do multiple image formats, resizing and other useful stuff like DPR.
    • the obvious downside to this is that it's another service we would need to host and ship. It is pretty lightweight, but still it needs resources.
    • this could help us optimize external images (e.g. README ones) as well

Either way we generate these images, we can make use of the awesome <picture> element, which lets the browser choose the best image format from the entries we specify.

主要语言
Java
星标
2.1k
派生
362
平均合并
1 天 3 小时
30 天内合并 PR
44

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

eclipse-openvsx/openvsx 的其他 Issue

查看 eclipse-openvsx/openvsx 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。