Responsive 画像 (srcset)
暫定日本語訳:どのように へ serve responsive 画像 とともに srcset と sizes attributes と picture element, いつ へ 使用 各, と どのように responsive 画像 fix LCP と CLS なしで being direct ランキング signal.
言語
暫定日本語訳:Responsive 画像 let ブラウザー (via srcset + sizes) または author (via <picture>) serve right-sized 画像 per device. srcset/sizes is resolution switching (同じ 画像, ブラウザー picks — suggestion); <picture> is art direction または format switching (author-dictated crops/formats — command). 大半の サイト だけ need srcset/sizes. この is ない direct ランキング signal と it doesn't change 何 Google indexes — Google indexes src URL — ただし it's concrete fix Lighthouse recommends 向けに oversized 画像 (its "Properly size images" audit fails at 4KiB gap) と, paired とともに explicit width/height, it's どのように あなた 防ぐ CLS. 保つ alt text identical と 画像 URLs stable 全体で breakpoints 向けに mobile-最初 インデックス登録. I reuse exact srcset + width/height pattern から my Ahrefs CLS 記事. Nests 下で 画像 SEO hub.
暫定日本語案: TL;DR — Responsive 画像 let ブラウザー load right-sized version of 暫定日本語案: picture instead of one giant file — small one on phone, big one on 暫定日本語案: desktop. あなた do it とともに
srcsetとsizesattributes on あなた<img>tag 暫定日本語案: (list sizes あなた have; ブラウザー picks). この doesn’t directly boost あなた 暫定日本語案: rankings, ただし it 作る ページ faster と stops them から “jumping” as 画像 load, 暫定日本語案: と speed is something Google 測定. 暫定日本語案: Evidence for this claim The HTML responsive-image features srcset, sizes, and picture let browsers select an appropriate image candidate. Scope: Current HTML responsive image behavior. Confidence: high · Verified: WHATWG HTML: Responsive images Evidence for this claim Google can process responsive images and recommends src as a fallback while using srcset or picture for responsive delivery. Scope: Current Google Images responsive-image guidance. Confidence: high · Verified: Google Search Central: Responsive images
何 responsive 画像 are
暫定日本語案: “responsive” 画像 adapts へ device looking at it. Instead of 送信 同じ 暫定日本語案: huge photo へ phone と desktop, あなた give ブラウザー few versions at 暫定日本語案: 異なる sizes と let it grab one その fits. Phones get small file; big 暫定日本語案: screens get big one. Less wasted データ, faster ページ.
暫定日本語案: There are two ways へ do この, と it’s worth knowing which is which:
- 暫定日本語案:
srcset+sizeson<img>— 一般的な one. 同じ picture, 異なる sizes. 暫定日本語案: あなた list 何 あなた have と ブラウザー chooses. この is called resolution 暫定日本語案: switching. - 暫定日本語案: **
<picture>element** — 向けに いつ あなた want genuinely 異なる 画像 at 暫定日本語案: 異なる sizes (say, wide crop on desktop と tall, tight crop on mobile), または 暫定日本語案: modern file format とともに fallback. この is called art direction, と 大半の 暫定日本語案: サイト don’t need it.
basic version
暫定日本語案: Here’s 何 resolution switching looks like:
<img
src="puppy-1000.jpg"
srcset="puppy-1000.jpg 1000w, puppy-2000.jpg 2000w, puppy-3000.jpg 3000w"
sizes="(max-width: 600px) 480px, 1000px"
width="1000" height="1000"
alt="Puppy with balloons" />- 暫定日本語案:
srcis あなた normal, 常に-there fallback. 保つ it. - 暫定日本語案:
srcsetlists versions あなた have と どのように wide 各 one is (1000w= 1000 暫定日本語案: pixels wide). - 暫定日本語案:
sizestells ブラウザー どのように big 画像 する actually 表示される so it できる pick 暫定日本語案: right file 前に it loads anything. - 暫定日本語案:
widthとheightreserve space so ページ doesn’t jump around while 暫定日本語案: 画像 loads. - 暫定日本語案:
altis 同じ 説明 あなた’d 常に write. 保つ it identical 全体で すべての 暫定日本語案: version.
なぜ bother ( honest answer)
暫定日本語案: Responsive 画像 don’t earn あなた ランキング “boost.” 何 それら do is 作る ページ load
暫定日本語案: faster と stop layout から shifting — と それらの are things Google 測定 as
暫定日本語案: part of ページ experience. If speed ツール (Lighthouse, PageSpeed Insights) is nagging
暫定日本語案: あなた へ “properly size images,” srcset/sizes is fix it’s asking 向けに.
暫定日本語案: One more thing: この doesn’t change 何 表示 up in Google 画像. Google indexes
暫定日本語案: 画像 in あなた src attribute — responsive variants are just delivery. So
暫定日本語案: 保つ あなた alt text, filename, と main 画像 URL 同じ no matter which
暫定日本語案: version ブラウザー loads.
暫定日本語案: Want precise version — w vs x descriptors, いつ あなた actually need
暫定日本語案: <picture>, LCP と layout-shift mechanics, と mobile-インデックス登録 rules —
暫定日本語案: switch へ Advanced tab.
暫定日本語案: TL;DR — Two jobs, one syntax family.
srcset/sizeson<img>= resolution 暫定日本語案: switching (同じ 画像, ブラウザー picks best-fit — suggestion);<picture>= art 暫定日本語案: direction または format switching (author-dictated crops/formats — command). 大半の 暫定日本語案: サイト だけ need 最初. Responsive 画像 are ない direct ランキング signal と 暫定日本語案: don’t change 何 Google indexes — Google indexessrcURL, so 保つalttext, 暫定日本語案: filenames, と 画像 URLs stable 全体で breakpoints (mobile-最初 インデックス登録). real 暫定日本語案: payoff is Core Web Vitals: right-sizing 画像 is fix behind Lighthouse’s 暫定日本語案: “Properly size images” audit (fails at 4KiB gap), とwidth/height(または 暫定日本語案:aspect-ratio) — ないsrcset— is 何 防ぐ CLS. Don’t lazy-load LCP 暫定日本語案: 画像. I reuse exactsrcset+width/heightpattern から my Ahrefs CLS piece. 暫定日本語案: Evidence for this claim The HTML responsive-image features srcset, sizes, and picture let browsers select an appropriate image candidate. Scope: Current HTML responsive image behavior. Confidence: high · Verified: WHATWG HTML: Responsive images Evidence for this claim Google can process responsive images and recommends src as a fallback while using srcset or picture for responsive delivery. Scope: Current Google Images responsive-image guidance. Confidence: high · Verified: Google Search Central: Responsive images
Two 異なる jobs, one syntax family
暫定日本語案: Everything in この topic collapses へ two mechanisms, と half confusion out 暫定日本語案: there comes から mixing them up:
- 暫定日本語案: Resolution switching — 同じ 画像 at 異なる sizes または pixel densities.
暫定日本語案: あなた give ブラウザー menu とともに
srcsetとsizeson<img>, と * 暫定日本語案: ブラウザー* decides which file へ fetch based on viewport と screen density. 暫定日本語案: この is 一般的な ケース. - 暫定日本語案: Art direction — genuinely 異なる 画像 per condition: wide crop on
暫定日本語案: desktop, tight vertical crop on mobile, または 異なる file format entirely. Here
暫定日本語案: あなた dictate choice とともに
<picture>element.
暫定日本語案: web.dev Learn: Responsive 画像
暫定日本語案: course frames difference exactly right: とともに srcset ブラウザー gets
暫定日本語案: suggestions, whereas “the picture element gives commands.”
暫定日本語案: と scope-設定 line worth tattooing on wall, また から web.dev: “You
probably won’t need to use the picture element for most of your responsive images —
the srcset and sizes attributes on the img element cover a lot of use cases.”
暫定日本語案: Reach 向けに <picture> だけ いつ あなた actually need 異なる 画像, ない 異なる
暫定日本語案: size of 同じ one.
srcset と sizes — resolution switching
w-descriptors vs. x-descriptors
暫定日本語案: srcset takes comma-separated list of candidate files, 各 tagged とともに
暫定日本語案: descriptor. There are two kinds:
- 暫定日本語案: Width descriptors (
w) — あなた state 各 file’s intrinsic pixel width 暫定日本語案: (puppy-2000.jpg 2000w). ブラウザー combines その とともに あなたsizesvalue へ 暫定日本語案: 機能 out which file best fits space と device’s pixel density. この is 暫定日本語案: flexible option と 何 あなた’ll 使用 大半の of time. - 暫定日本語案: Pixel-density descriptors (
x) — あなた state which file is 向けに which device 暫定日本語案: pixel ratio (logo.png 1x, logo@2x.png 2x). 使用 これらの 向けに fixed-size 画像 ( 暫定日本語案: avatar, logo) どこ displayed size 決して changes; あなた don’t needsizesとともに 暫定日本語案:xdescriptors.
暫定日本語案: Rule of thumb: fluid, コンテンツ-width 画像 → w descriptors + sizes; fixed-size UI
暫定日本語案: 画像 → x descriptors.
なぜ sizes matters (と 何 happens if あなた skip it)
暫定日本語案: とともに w descriptors, sizes isn’t optional cosmetics — it’s どのように ブラウザー knows
暫定日本語案: どのように big 画像 する render so it できる choose 前に layout. Per
暫定日本語案: web.dev, sizes “tells the browser
what size you expect the image to be displayed at under different conditions,” as
暫定日本語案: comma-separated list of media conditions と widths:
sizes="(max-width: 600px) 480px, 1000px"暫定日本語案: Read it as: “if the viewport is 600px or narrower, the image will be about 480px
wide; otherwise, about 1000px.” Omit sizes と ブラウザー assumes 画像 fills
暫定日本語案: full viewport width (100vw) — so on wide screen it 可能性がある pull あなた largest file
暫定日本語案: 向けに 画像 その’s actually rendering at 400px, quietly defeating whole point.
暫定日本語案: 不足している sizes is single 大半の 一般的な srcset mistake.
暫定日本語案: Don’t guess at それらの width values から layout in あなた head — 確認 画像’s
暫定日本語案: actual rendered CSS width in ブラウザー (DevTools → Elements → computed
暫定日本語案: width of <img> box) at 各 breakpoint あなた care について, と 設定 sizes へ
暫定日本語案: match. sizes value その doesn’t match real rendered width still causes
暫定日本語案: ブラウザー へ select 誤った candidate even though markup is syntactically
暫定日本語案: 正しい — syntax validation alone won’t catch その; see currentSrc 確認
暫定日本語案: below へ confirm 何 actually loaded.
機能 例 (my reusable pattern)
暫定日本語案: この is exact pattern から my Ahrefs piece,
暫定日本語案: 何 Is Cumulative Layout Shift (CLS) & どのように へ Improve It,
暫定日本語案: expanded とともに sizes:
<img
src="puppy-1000.jpg"
srcset="puppy-1000.jpg 1000w,
puppy-2000.jpg 2000w,
puppy-3000.jpg 3000w"
sizes="(max-width: 600px) 480px, 1000px"
width="1000" height="1000"
alt="Puppy with balloons" />暫定日本語案: すべての piece is load-bearing: src is fallback と URL Google indexes;
暫定日本語案: srcset lists candidates とともに w descriptors; sizes tells ブラウザー
暫定日本語案: rendered width; width/height reserve space ( CLS fix — more below); alt stays
暫定日本語案: identical no matter which file loads.
picture element — art direction と format switching
いつ あなた actually need it
暫定日本語案: 使用 <picture> 向けに two things srcset できる’t do:
- 暫定日本語案: Art direction — 異なる crop per breakpoint. web.dev’s 例: on 暫定日本語案: narrow phone あなた might serve tall, tight crop; on wide desktop, short, wide 暫定日本語案: one. 同じ subject, deliberately 異なる framing.
- 暫定日本語案: Format switching — オファー AVIF/WebP とともに JPEG fallback via
<source type="…">, letting ブラウザー take 最初 format it supports. この ties 暫定日本語案: straight back へ format guidance on 画像 SEO hub.
syntax (と fallback rule)
暫定日本語案: <picture> element wraps one または more <source> elements と 常に ends とともに
暫定日本語案: plain <img>:
<!-- Art direction: different crop per breakpoint -->
<picture>
<source media="(max-width: 600px)" srcset="hero-crop-mobile.jpg">
<img src="hero-crop-desktop.jpg" width="1200" height="675"
alt="Product hero shot">
</picture>
<!-- Format switching: modern format with a fallback -->
<picture>
<source type="image/avif" srcset="hero.avif">
<source type="image/webp" srcset="hero.webp">
<img src="hero.jpg" width="1200" height="675" alt="Product hero shot">
</picture>暫定日本語案: その trailing <img src> is ない optional. Google states it directly: per
暫定日本語案: section 4.8.1 of HTML Standard,
暫定日本語案: “make sure that you provide an img element as a fallback with a src attribute when
using the picture element.” It’s file older ブラウザー と crawlers fall back へ —
暫定日本語案: と, again, one Google indexes.
Does srcset 役立つ SEO? Direct vs. indirect
暫定日本語案: Here’s framing すべての competing guide fumbles, so I’ll be blunt.
暫定日本語案: Directly: no. Responsive-画像 markup is ない ランキング signal way alt text または
暫定日本語案: filenames are 向けに 画像 検索. Adding srcset doesn’t lift あなた positions, と it
暫定日本語案: doesn’t change 何 表示される in Google 画像. Google indexes 画像 referenced in
暫定日本語案: src; srcset/<picture> variants are delivery mechanism, ない separately
暫定日本語案: indexable assets. 保つ あなた alt text, filename, と structured データ attached へ
暫定日本語案: その 主要 src 画像.
暫定日本語案: Indirectly: yes, と it’s one of biggest levers あなた have. Right-sized 画像 暫定日本語案: are 大半の effective concrete fix 向けに two Core Web Vitals — LCP と CLS — which フィード 暫定日本語案: Google’s ページ-experience signals. その’s whole payoff. It’s 同じ shape as 暫定日本語案: WebP/AVIF story on 画像 SEO hub: no boost 向けに format itself, win is 暫定日本語案: speed.
Responsive 画像 と LCP
暫定日本語案: Oversized 画像 are one of 大半の 一般的な causes of slow Largest Contentful 暫定日本語案: Paint, と responsive 画像 are Lighthouse’s recommended fix. 暫定日本語案: Lighthouse “Properly size images” audit 暫定日本語案: lists “all images in your page that aren’t appropriately sized, along with the potential savings” — anything bigger than it needs へ be “just results in wasted bytes and slows down page load time.” Its fix, verbatim: “With responsive images, you generate multiple versions of each image, and then specify which version to use in your HTML or CSS using media queries, viewport dimensions, and so on.”
暫定日本語案: Two specifics worth knowing:
- 暫定日本語案: ** failure threshold is 4KiB.** Lighthouse だけ flags 画像 いつ “the rendered size is at least 4KiB smaller than the actual size.” Small overshoots don’t count; 暫定日本語案: serving 3000px file へ 400px slot does.
- 暫定日本語案: ** tooling shortcut.** Google recommends
暫定日本語案: RespImageLint,
暫定日本語案: “a helpful bookmarklet for identifying the optimal
srcsetandsizesvalues for your images.” Run it 前に あなた hand-calculate breakpoints.
Don’t lazy-load LCP 画像
暫定日本語案: この is rule 人々 break 大半の. srcset on あなた hero is fine — ただし 決して pair it
暫定日本語案: とともに lazy loading on LCP element. largest above—fold 画像 すべき load
暫定日本語案: eagerly とともに fetchpriority="high", exactly as 画像 SEO hub covers. と いつ あなた
暫定日本語案: 構築 responsive <picture> hero, 保つ swap logic native: Google warns その it
暫定日本語案: “won’t load content that requires user interactions”
暫定日本語案: like swiping または クリック, so JS scheme その だけ loads real 画像 後に
暫定日本語案: interaction hides it から Google.
Responsive 画像 と CLS
暫定日本語案: Here’s trap: srcset alone does nothing 向けに layout shift. Resolution
暫定日本語案: switching decides which file loads; it doesn’t reserve space 向けに it. Left なしで
暫定日本語案: dimensions, per web.dev’s Optimize CLS guide,
暫定日本語案: “as images load, text shifts down the page to make room for them” — because space
“can’t be allocated for it until the browser starts to download it and can determine
its dimensions.”
暫定日本語案: fix is explicit dimensions, と it composes とともに responsive markup:
- 暫定日本語案: 設定
widthとheightattributes on<img>. Modern ブラウザー “set the default aspect ratio of images based on an image’swidthandheightattributes,” 暫定日本語案: so それらの two numbers reserve right box 前に anysrcsetvariant downloads. 暫定日本語案: (web.dev) - 暫定日本語案: Pair them とともに
height: autoin CSS 向けに fluid containers. この is part その 暫定日本語案: looks contradictory ただし isn’t: web.dev’s own guidance is へ “use CSS to resize the image to the width of the container” と “setheight: auto;to avoid using a fixed value for the image height.” HTML attributes 設定 intrinsic aspect ratio; 暫定日本語案: CSS lets 画像 scale fluidly. Together それら 防ぐ CLS と stay 暫定日本語案: responsive. - 暫定日本語案: または 使用 CSS
aspect-ratioへ reserve space いつ あなた できる’t 設定 attributes.
暫定日本語案: Which kills persistent myth: width/height attributes don’t break fluid layouts.
暫定日本語案: Attributes + height: auto is 正しい combo, ない conflict. I walk 通じて
暫定日本語案: full layout-shift mechanics in my Ahrefs CLS 記事; short version is
暫定日本語案: “reserve the space so that there’s no shift”
暫定日本語案: と let 画像 fill it.
Mobile-最初 インデックス登録 implications
暫定日本語案: Google indexes primarily mobile version of あなた ページ, so two rules matter more 暫定日本語案: than それら 使用 へ いつ あなた’re serving responsive variants:
- 暫定日本語案: 保つ alt text identical 全体で breakpoints. Google’s 暫定日本語案: mobile-最初 インデックス登録 best practices 暫定日本語案: say へ “make sure that the mobile site has the same alt text for images as the desktop site.” art-directed mobile crop 必要がある ない drop context Google needs.
- 暫定日本語案: 保つ 画像 URLs stable. Don’t 使用 URLs その change すべての time ページ loads 暫定日本語案: 向けに 画像. 暫定日本語案: この dovetails とともに Google’s 画像 SEO guidance へ 暫定日本語案: consistently reference 画像 とともに 同じ URL 暫定日本語案: so it できる cache と reuse it. Responsive CDNs その mint fresh URL per リクエスト break 暫定日本語案: この — pin stable URLs 向けに あなた variants.
暫定日本語案: Google’s own summary of なぜ へ bother is plain: 暫定日本語案: “designing responsive web pages leads to better user experience, since people can access them across a plethora of device types.”
何 について Bing
暫定日本語案: There’s no Bing-specific guidance on srcset, sizes, または <picture> element —
暫定日本語案: Bing’s public ドキュメント doesn’t address responsive-画像 markup at all. So don’t
暫定日本語案: justify responsive 画像 とともに Bing アルゴリズム hook; ケース is パフォーマンス と UX,
暫定日本語案: which Bing (like Google) treats as ページ-experience quality rather than something あなた
暫定日本語案: できる point at documented responsive-画像 rule 向けに.
よくある間違い
- 暫定日本語案: Forgetting
sizesとともにwdescriptors — ブラウザー assumes100vwと 可能性がある 暫定日本語案: fetch あなた biggest file 向けに small slot. - 暫定日本語案: Dropping fallback
srcon<picture>— spec violation Google explicitly 暫定日本語案: flags, と it’s URL crawlers インデックス登録. - 暫定日本語案: Mismatched
width/heightratio vs. actually-served 画像 — still causes 暫定日本語案: shift. - 暫定日本語案: Lazy-loading LCP hero — delays LCP 向けに no 理由; load it eagerly とともに
暫定日本語案:
fetchpriority="high". - 暫定日本語案: Regenerating 画像 URLs per リクエスト — breaks Google’s caching と 暫定日本語案: mobile-最初 “stable URL” rule.
- 暫定日本語案: Reaching 向けに
<picture>いつsrcset/sizesする do — unnecessary 暫定日本語案: complexity; web.dev says 大半の サイト don’t need it.
どこ この sits
暫定日本語案: この is sizing-と-delivery deep dive 下で broader 画像 SEO hub —
暫定日本語案: パフォーマンス half of 画像 SEO, parallel へ どのように alt text guide handles
暫定日本語案: 画像-検索 half. 向けに layout-shift mechanics in full, see my Ahrefs CLS 記事;
暫定日本語案: 向けに LCP, fetchpriority, と loading strategy, その’s Core Web Vitals 機能
暫定日本語案: wearing 画像 hat.
AI要約
暫定日本語案: condensed take on Advanced version:
- 暫定日本語案: Two mechanisms, one family.
srcset/sizeson<img>= resolution 暫定日本語案: switching (同じ 画像, ブラウザー picks best-fit — suggestion).<picture>= art 暫定日本語案: direction または format switching (author-dictated crops/formats — command). 大半の 暫定日本語案: サイト だけ needsrcset/sizes. - 暫定日本語案: Descriptors:
w(width) descriptors needsizesattribute と cover fluid, 暫定日本語案: コンテンツ-width 画像;x(pixel-density) descriptors suit fixed-size UI 画像 と 暫定日本語案: don’t needsizes. - 暫定日本語案:
sizesis mandatory とともにwdescriptors — omit it と ブラウザー assumes 暫定日本語案:100vw, 多くの場合 fetching largest file needlessly. 大半の 一般的なsrcsetmistake. - 暫定日本語案: ない direct ランキング signal. Responsive markup doesn’t change 何 Google
暫定日本語案: indexes — Google indexes
srcURL; variants are delivery だけ. 保つ alt text, 暫定日本語案: filenames, と structured データ on 主要src画像. - 暫定日本語案: LCP payoff: oversized 画像 are top cause of slow LCP; responsive 画像 are
暫定日本語案: Lighthouse’s recommended fix (“Properly size images” audit; fails at 4KiB gap;
暫定日本語案: RespImageLint 役立つ pick
srcset/sizes). - 暫定日本語案: CLS:
srcsetalone does nothing 向けに shift — 設定width/heightattributes (または 暫定日本語案: CSSaspect-ratio), paired とともにheight: auto向けに fluid layouts. Attributes + 暫定日本語案:height: autois 正しい combo, ない conflict. - 暫定日本語案: 決して lazy-load LCP 画像; load it eagerly とともに
fetchpriority="high", と 暫定日本語案: 保つ responsive swaps native (Google won’t load interaction-triggered コンテンツ). - 暫定日本語案: Mobile-最初 インデックス登録: 同じ alt text と stable 画像 URLs 全体で breakpoints; 暫定日本語案: don’t mint fresh URL per リクエスト.
- 暫定日本語案: Bing: no dedicated responsive-画像 guidance — justify 機能 on パフォーマンス/UX.
公式ドキュメント
暫定日本語案: 主要-ソース ドキュメント と developer guidance.
暫定日本語案: Google — 検索
- 暫定日本語案: Google 画像 best practices —
srcsetnote,<picture>fallback-srcrequirement, 同じ-URL guidance, と responsive-design rationale. - 暫定日本語案: Mobile-最初 インデックス登録 best practices — 同じ alt text と stable 画像 URLs 全体で mobile と desktop; don’t lazy-load 主要 コンテンツ on interaction.
暫定日本語案: Google — web.dev (developer guidance)
- 暫定日本語案: Learn: Responsive 画像 —
srcsetcomplementssrc; どのようにsizesと media conditions 機能. - 暫定日本語案: Learn: picture element — いつ あなた need
<picture>, art direction, と “suggestions vs. commands.” - 暫定日本語案: Optimize Cumulative Layout Shift —
width/heightattributes, aspect ratio, とheight: auto向けに fluid 画像. - 暫定日本語案: Fetch Priority API —
fetchpriority="high"向けに LCP 画像.
暫定日本語案: Chrome DevTools / Lighthouse
- 暫定日本語案: Properly size 画像 (使用-responsive-画像) — audit, 4KiB threshold, と RespImageLint bookmarklet.
暫定日本語案: MDN
- 暫定日本語案: Using responsive 画像 in HTML — reference 向けに
srcset,sizes,w/xdescriptors, と<picture>syntax.
出典からの引用
暫定日本語案: On—record statements から Google’s ドキュメント と developer guidance. どこ 暫定日本語案: ページ exposes text, link is deep link その jumps へ quoted passage.
暫定日本語案: Google — 画像 SEO docs
- 暫定日本語案: “The
srcsetattribute allows specifying different versions of the same image, specifically for different screen sizes.” 暫定日本語案: Jump へ quote - 暫定日本語案: “Designing responsive web pages leads to better user experience, since people can access them across a plethora of device types.” 暫定日本語案: ソース
- 暫定日本語案: On 保持 画像 URLs stable: “consistently reference the image with the same URL, so that Google can cache and reuse the image.” 暫定日本語案: Jump へ quote
暫定日本語案: Google — Mobile-最初 インデックス登録 docs
- 暫定日本語案: “Make sure that the mobile site has the same alt text for images as the desktop site.” 暫定日本語案: Jump へ quote
- 暫定日本語案: “Don’t use URLs that change every time the page loads for images.” 暫定日本語案: Jump へ quote
暫定日本語案: web.dev — srcset vs. picture
- 暫定日本語案: “Where the
srcsetattribute gives suggestions to the browser, thepictureelement gives commands.” 暫定日本語案: Jump へ quote
暫定日本語案: Me — on CLS fix
- 暫定日本語案: “Reserve the space so that there’s no shift” と 画像 simply fills it. 暫定日本語案: Jump へ quote
暫定日本語案: Note: several 二次 recaps attribute Google I/O 2019 recommendation of
暫定日本語案: <picture> element / srcset 向けに 画像 SEO へ John Mueller, ただし no 主要
暫定日本語案: transcript とともに citable wording was locatable, so I’ve left it out rather than quote
暫定日本語案: it. No Bing-specific responsive-画像 guidance exists へ quote. web.dev,
暫定日本語案: Lighthouse, と Google-doc quotes above are から live, deep-linkable ページ.
Copy-paste responsive 画像 patterns
暫定日本語案: Three patterns その cover almost すべての real ケース. All of them 保つ fallback src,
暫定日本語案: explicit width/height ( CLS fix), と identical alt text.
暫定日本語案: 1. Resolution switching — everyday <img srcset> (my reusable pattern)
<img
src="puppy-1000.jpg"
srcset="puppy-1000.jpg 1000w,
puppy-2000.jpg 2000w,
puppy-3000.jpg 3000w"
sizes="(max-width: 600px) 480px, 1000px"
width="1000" height="1000"
alt="Puppy with balloons" />暫定日本語案: Pair it とともに この CSS so 画像 scales fluidly なしで causing layout shift:
img {
max-width: 100%;
height: auto; /* with width/height attributes set, this prevents CLS */
}暫定日本語案: 2. Fixed-size 画像 — pixel-density (x) descriptors, no sizes needed
<img
src="logo.png"
srcset="logo.png 1x, logo@2x.png 2x"
width="200" height="60"
alt="Company logo" />暫定日本語案: 3. LCP hero — eager + high priority, と format fallback via <picture>
<picture>
<source type="image/avif" srcset="hero.avif">
<source type="image/webp" srcset="hero.webp">
<img
src="hero.jpg"
width="1200" height="675"
fetchpriority="high"
loading="eager"
alt="Product hero shot" />
</picture>暫定日本語案: Rules baked へ これらの:
- 暫定日本語案: 常に 保つ trailing
<img src>— it’s fallback と URL Google indexes. - 暫定日本語案: とともに
wdescriptors,sizesis 必要; なしで it ブラウザー assumes100vw. - 暫定日本語案: とともに
xdescriptors, omitsizes. - 暫定日本語案: 決して 追加
loading="lazy"へ LCP 画像 (pattern 3) — その delays LCP; 使用 暫定日本語案:fetchpriority="high"instead.
暫定日本語案: へ find right srcset/sizes values instead of guessing, run
暫定日本語案: RespImageLint,
暫定日本語案: bookmarklet Google recommends, 超えて live ページ.
Which one do あなた actually need: srcset/sizes または picture
暫定日本語案: 機能 通じて real branch 記事 draws 間に resolution switching と art 暫定日本語案: direction / format switching.
srcset/sizes vs. the picture element
暫定日本語案: 大半の サイト stop at 最初 branch と 決して leave srcset/sizes — reach 向けに
暫定日本語案: <picture> だけ いつ 画像 itself needs へ change, ない just its size.
何 ない へ do
暫定日本語案: Six concrete mistakes 記事 calls out, 各 とともに なぜ it’s 誤った と fix.
- 暫定日本語案: Forgetting
sizesattribute とともにw-descriptors. なぜ it’s 誤った: なしで 暫定日本語案:sizes, ブラウザー assumes 画像 fills full viewport width (100vw), so 暫定日本語案: it 可能性がある fetch あなた biggest candidate 向けに slot その renders much smaller. Do 暫定日本語案: instead: 常に pairw-descriptorsrcsetとともにsizesvalue その matches どのように 暫定日本語案: 画像 actually renders at 各 breakpoint. - 暫定日本語案: Dropping fallback
<img src>on<picture>. なぜ it’s 誤った: it’s spec 暫定日本語案: violation Google explicitly flags, と it’s URL crawlers と Google 画像 暫定日本語案: actually インデックス登録 — no fallback means no indexable 画像. Do instead: すべての 暫定日本語案:<picture>block ends とともに plain<img src="...">, 決して just<source>暫定日本語案: elements. - 暫定日本語案: Mismatched
width/heightratio versus actually-served 画像. なぜ it’s 暫定日本語案: 誤った: attributes 設定 reserved aspect ratio; if real 画像 doesn’t 暫定日本語案: match it, layout still shifts once 画像 loads. Do instead: 保つ 暫定日本語案:width/height(またはaspect-ratio) ratio identical へ 画像 files あなた’re 暫定日本語案: actually serving 全体で allsrcset/<picture>variants. - 暫定日本語案: Lazy-loading LCP hero 画像. なぜ it’s 誤った:
loading="lazy"delays 暫定日本語案: fetch of exactly 画像 Largest Contentful Paint is timing, pushing LCP later 暫定日本語案: 向けに no benefit. Do instead: load LCP 画像 eagerly とともに 暫定日本語案:fetchpriority="high", 決してloading="lazy". - 暫定日本語案: Regenerating 画像 URLs on すべての リクエスト. なぜ it’s 誤った: it breaks Google’s 暫定日本語案: 画像 caching と violates mobile-最初 インデックス登録 rule against URLs その change 暫定日本語案: すべての time ページ loads. Do instead: pin stable, consistent URLs per 画像 暫定日本語案: variant so Google できる cache と reuse them.
- 暫定日本語案: Reaching 向けに
<picture>いつsrcset/sizesする do. なぜ it’s 誤った: it’s 暫定日本語案: unneeded complexity — web.dev is explicit その 大半の サイト don’t need<picture>暫定日本語案: at all. Do instead: デフォルト へsrcset/sizesresolution switching; だけ 追加 暫定日本語案:<picture>いつ あなた genuinely need 異なる crop または format per condition.
一般的な 問題
暫定日本語案: Symptom-最初 lookup 向けに two responsive-画像 問題 readers actually hit.
Layout still shifts (CLS) even though srcset is 設定 up
- 暫定日本語案: Symptom: Lighthouse または PageSpeed Insights still レポート layout shift on
暫定日本語案: 画像, または あなた できる visually see コンテンツ jump as 画像 loads, despite having
暫定日本語案: 機能
srcset/sizes. - 暫定日本語案: Likely cause:
srcsetalone does nothing 向けに layout shift — it だけ decides 暫定日本語案: which file loads, ない どのように much space へ reserve. 画像 has nowidth/ 暫定日本語案:heightattributes (または CSSaspect-ratio), so ブラウザー できる’t allocate space 暫定日本語案: until file starts downloading と its dimensions are known. - 暫定日本語案: Fix + confirm: 追加 explicit
widthとheightattributes へ<img>(または 暫定日本語案: 設定 CSSaspect-ratio), と pair them とともにheight: autoin CSS so 画像 暫定日本語案: still scales fluidly. Confirm by re-running CLS 確認 (Lighthouse または live CrUX 暫定日本語案: 確認) と watching 向けに shift へ disappear — reserved box すべき 現在 hold 暫定日本語案: its size 前に 画像 finishes loading.
Lighthouse flags “Properly size images” / oversized 画像 is loading
- 暫定日本語案: Symptom: Lighthouse “Properly size images” audit lists one または more 画像 暫定日本語案: とともに wasted bytes, または ページ feels slow へ reach its Largest Contentful Paint even 暫定日本語案: though 画像 itself looks fine.
- 暫定日本語案: Likely cause: rendered size of 画像 is at least 4KiB smaller than
暫定日本語案: actual file being served — commonly because there’s no
srcsetat all, またはsizes暫定日本語案: is 不足している so ブラウザー defaulted へ100vwと pulled largest candidate 向けに 暫定日本語案: small slot. - 暫定日本語案: Fix + confirm: 追加 (または 正しい)
srcsetとともに appropriately sized candidates と 暫定日本語案:sizesvalue matching real rendered width; run 暫定日本語案: RespImageLint 暫定日本語案: へ 確認 values instead of guessing. Confirm by re-running Lighthouse 暫定日本語案: “Properly size images” audit と 確認 flagged 画像 no longer 表示される (または 暫定日本語案: its potential savings drop below 4KiB threshold).
Cheat sheet: descriptors, picture vs. srcset, と CLS/LCP rules
| Situation | 使用 | Notes |
|---|---|---|
| Fluid, コンテンツ-width 画像 その scales とともに its container | srcset とともに w-descriptors + sizes | sizes is mandatory — omit it と ブラウザー assumes 100vw |
| Fixed-size 画像 (logo, avatar, icon) | srcset とともに x-descriptors | No sizes needed — displayed size 決して changes |
| 同じ 画像, 異なる rendered size | srcset/sizes on <img> (resolution switching) | suggestion へ ブラウザー — it picks best-fit file |
| 異なる crop/framing per breakpoint | <picture> とともに <source media="..."> (art direction) | command — あなた dictate which 画像 loads |
| Modern format (AVIF/WebP) とともに fallback | <picture> とともに <source type="..."> | 常に end とともに plain <img src> fallback |
| 防ぐ CLS | width/height attributes または CSS aspect-ratio, plus height: auto 向けに fluid layouts | srcset alone does ない 防ぐ layout shift |
| Fix slow LCP から oversized 画像 | Right-sized srcset/sizes | Lighthouse “Properly size images” fix; fails at 4KiB gap |
| LCP hero 画像 loading strategy | fetchpriority="high", 決して loading="lazy" | Lazy-loading LCP element delays LCP 向けに no 理由 |
| 何 Google indexes | src URL だけ | srcset/<picture> variants are delivery, ない separately インデックス登録 assets |
Validation tests
暫定日本語案: Pass/fail checks その confirm responsive-画像 change actually took effect.
Properly-sized 画像 ship correctly
暫定日本語案: テスト へ run: Run Lighthouse “Properly size images” audit (Chrome DevTools >
暫定日本語案: Lighthouse > パフォーマンス, または PageSpeed Insights) on ページ あなた just updated.
暫定日本語案: Expected result: 画像 あなた fixed no longer 表示される in audit’s flagged
暫定日本語案: list, または its potential savings drop below 4KiB gap threshold. Failure
暫定日本語案: interpretation: If it’s still flagged, either srcset candidates are still too
暫定日本語案: large 向けに rendered size, または sizes is 不足している/誤った と ブラウザー is still
暫定日本語案: defaulting へ 100vw. 監視 window: Immediate — re-run right 後に
暫定日本語案: deploying change. Rollback trigger: audit still flags 同じ 画像 とともに
暫定日本語案: unchanged potential savings 後に confirming sizes matches real rendered width.
srcset/sizes values are actually optimal
暫定日本語案: テスト へ run: Run
暫定日本語案: RespImageLint
暫定日本語案: ( bookmarklet Google recommends) against live ページ. Expected result: No
暫定日本語案: warnings について oversized candidates または 不足している/incorrect sizes value.
暫定日本語案: Failure interpretation: warning means either candidate is unnecessarily large
暫定日本語案: 向けに its breakpoint または sizes doesn’t match container’s real rendered width.
暫定日本語案: 監視 window: Immediate, on live URL 後に deploy. Rollback trigger:
暫定日本語案: RespImageLint 保持 flagging 同じ 画像 後に あなた’ve corrected sizes value.
ブラウザー actually selected candidate あなた expected
暫定日本語案: テスト へ run: Passing Lighthouse/RespImageLint checks confirms あなた markup is
暫定日本語案: 有効 — it doesn’t confirm ブラウザー picked file あなた intended at given
暫定日本語案: viewport. Load ページ at breakpoint あなた care について, open DevTools, select
暫定日本語案: <img>, と 確認 its
暫定日本語案: currentSrc
暫定日本語案: プロパティ in console ($0.currentSrc in Chrome/Firefox DevTools) — MDN’s own
暫定日本語案: 例 does exactly この: comparing currentSrc against expected filename へ
暫定日本語案: confirm which candidate loaded. Cross-確認 against Network tab へ see which
暫定日本語案: file was actually リクエスト. Repeat at あなた narrow と wide breakpoints, と at 1x
暫定日本語案: と 2x device pixel ratio if あなた emulate it.
暫定日本語案: Expected result: currentSrc matches candidate file あなた’d expect 向けに その
暫定日本語案: viewport width と pixel density, と Network tab 表示 だけ その file was
暫定日本語案: fetched. Failure interpretation: If currentSrc returns candidate bigger または
暫定日本語案: smaller than expected, either sizes value doesn’t match 画像’s actual
暫定日本語案: rendered CSS width (see “Why sizes matters” in Advanced tab) または srcset
暫定日本語案: descriptor is 誤った. Note その ブラウザー selection is implementation-defined —
暫定日本語案: HTML Standard leaves exact choice among 有効 candidates へ ブラウザー
暫定日本語案: (density, zoom, と network conditions できる all factor in), so don’t expect
暫定日本語案: byte-identical behavior 全体で ブラウザー; 確認 向けに “reasonable candidate,” ない one
暫定日本語案: fixed answer. 監視 window: Immediate — 確認 per breakpoint right 後に
暫定日本語案: deploying. Rollback trigger: currentSrc 保持 returning oversized candidate
暫定日本語案: at narrow viewport 後に あなた’ve corrected sizes へ match real rendered
暫定日本語案: width.
No layout shift から 画像
暫定日本語案: テスト へ run: 確認 Cumulative Layout Shift 向けに ページ — Lighthouse’s CLS score,
暫定日本語案: または live CrUX/PageSpeed Insights field-データ 確認 向けに URL. Expected result:
暫定日本語案: CLS attributable へ 画像 drops へ (near) zero once width/height (または
暫定日本語案: aspect-ratio) are 設定. Failure interpretation: Persistent shift usually means
暫定日本語案: width/height ratio doesn’t match actual 画像 being served, または attributes
暫定日本語案: are 不足している entirely. 監視 window: Lab データ is immediate; field データ (CrUX)
暫定日本語案: needs について 28 days へ accumulate trustworthy trend. Rollback trigger: CLS in
暫定日本語案: field データ doesn’t improve 後に 28 days despite lab 確認 passing — revisit
暫定日本語案: whether served 画像 ratio actually matches reserved box.
テスト yourself: Responsive 画像
暫定日本語案: Five quick questions on srcset, sizes, <picture>, と どのように responsive 画像
暫定日本語案: affect SEO. Pick answer 向けに 各, then 確認.
変更履歴
2026年7月18日に更新。
編集概要と記録された変更の詳細。変更の詳細
-
変更の詳細な注記は現在英語でのみ提供されています。
-
変更の詳細な注記は現在英語でのみ提供されています。
完全な比較は利用できません — この改訂の以前のスナップショットがアーカイブされていません。