Individual skill
picture-element
Use when reviewing image assets, markup, and CDN or build transforms related to Use <picture> with an <img> fallback. Check encoded size, rendered size, loading strategy, and above-the-fold impact together.
skills/picture-element/SKILL.md
Source commit e8d14d049010e2ce25afcd5e8609dfcbbe63e47e
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Network or broad shell
- Last checked
- Nov 9, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 74,693
- Repository last updated
- Oct 31, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- frontend Repository topic
- front-end-development Repository topic
- front-end-developer-tool Repository topic
- guidelines Repository topic
- checklist Repository topic
- reference Repository topic
- web-development Repository topic
- html Repository topic
- css Repository topic
- javascript Repository topic
- engineering Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 3,113 bytesSKILL.mdcore · 3,113 bytesSKILL.mdcore · 3,113 bytesSKILL.mdcore · 3,113 bytesreferences/rule.mddoc · 5,501 bytes
Read excerpt
# Use <picture> with an <img> fallback
A `<picture>` without an `<img>` fallback renders nothing in browsers that don't support `<picture>` (IE11) or don't support any of the `<source>` formats. The `<img>` child is also where `alt`, `width`, `height`, `loading`, and `fetchpriority` attributes live—these apply regardless of which source the browser selects.
## Quick Reference
- Every `<picture>` must end with an `<img>` element—it is the required fallback and carries `alt`
- `<source>` elements are evaluated top-to-bottom; the first match wins
- Use `type="image/avif"` and `type="image/webp"` on `<source>` for format selection
- The `<img src>` should point to a JPEG or PNG—the universal fallback for all browsers
## Check
Scan all <picture> elements in this codebase. Verify: 1) Every <picture> has an <img> as its last child (required fallback). 2) The <img> has an alt attribute. 3) The <img> has width and height attributes. 4) <source> elements appear before the <img> child. 5) Each <source> has either a srcset attribute or a media attribute. 6) format-selecting <source> elements have a type attribute (type="image/avif", type="image/webp"). Flag any <picture> missing an <img> child or with <img> not as the last child.