Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Images in pages have no size, no lazy loading and no async decoding

オープン
#681 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@guidol-ive がすでに取り組んでいます。

2026年10月28日 から。

  • #684 @guidol-ive による — オープン

評価

難易度
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 の本文から書いたものです。

説明

Impact: Medium Level: Easy Type: Enhancement Value: Visitors

Problem

Images in the text of a page or an article (<img> from the editor) are sent as they were saved:

  • without width and height, 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 its width and height from 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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

PlanBCode/hypha のほかの issue

PlanBCode/hypha の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。