Images in pages have no size, no lazy loading and no async decoding
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- javascript
- 領域
- backend
調査の方向性
The issue names images in page and article content stored in data/images/, and links PR #684; inspect that pull request first to see the work already underway. The expected result is dimensions from image files when absent, preserved existing attributes, height: auto, lazy loading except for the first image, and async decoding on every image.
索引モデルが issue の本文から書いたものです。
説明
Problem
Images in the text of a page or an article (<img> from the editor) are sent as they were saved:
- without
widthandheight, so the text jumps down while each image loads (Lighthouse: "Image elements do not have explicit width and height", Cumulative Layout Shift); - without
loading="lazy", so a long article loads every image at once, also the ones far below the fold; - without
decoding="async", so decoding a large image can hold up the rest of the page.
A page of a large publisher compared with a Hypha page: of 206 images, 205 have loading="lazy" and 201 have a size; on the Hypha front page none of 17 has loading="lazy" and 1 has a size.
#672 (PR #673) handles the teasers of articles. This issue is about the images in the content itself.
Expected
- An image stored in
data/images/gets itswidthandheightfrom the file when the editor did not set them, and a style rule keeps its proportions when a theme scales it (height: auto). - Every image except the first one in the page gets
loading="lazy": the first one is often the largest image in view (Largest Contentful Paint) and should load at once. - Every image gets
decoding="async". - Attributes that are already set (by the editor or a theme) are kept.
- 主要言語
- JavaScript
- スター
- 5
- フォーク
- 9
- 平均マージ
- 19時間 10分
- マージ済み PR(30日)
- 12
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PlanBCode/hypha のほかの issue
-
Component: User interface Impact: Low Level: Easy Pagetype: Peer reviewed article Type: Bug Value: Visitors
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
Impact: Medium Level: Easy Type: Bug Value: Users
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
Impact: Low Level: Easy Pagetype: Festival Type: Bug Value: Coders
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
Impact: Medium Level: Easy Pagetype: Mailinglist Type: Bug Value: Users
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
Impact: Low Level: Easy Type: Bug Value: Coders
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
PlanBCode/hypha#586 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
PlanBCode/hypha の issue をすべて見る
似ている issue
-
check:failed logos:add
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
iptv-org/database#38874 · コメント 1 件 ·
メンテナーはふだん 4 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
githubnext/gh-aw-workshop#5193 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
agent/quality stage/040-covered-by-pr testing
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
cncf/endusers#2031 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信