ampproject / ampproject/wg-components

Discussion: Deprecating <amp-img>

Open
#43 1 comment 0 reactions 0 assignees View on GitHub
Type: Discussion
Dominant language
No language data
Stars
11
Forks
14
PR merge metrics
No merged PRs in 30d

Description

# Context
[`amp-img`](https://amp.dev/documentation/components/amp-img/) allows the runtime to effectively manage image resources based on the viewport position, system resources, connection bandwidth, or other factors. With increasing browser support for more granular control on the native `img` tag, it is time to discuss a deprecation strategy for `amp-img`.

# What would it take to deprecate amp-img?
To support a comparable feature set without `amp-img`, we first need broader support for [lazy loading](https://caniuse.com/#feat=loading-lazy-attr) and [aspect ratio](https://github.com/WICG/intrinsicsize-attribute), but there may be other critical features preventing the possibility of any imminent change. First steps are: (1) understanding the minimal range of critical features and (2) tracking ongoing progress for these across browsers.

# Open questions

- **Using the AMP cache:** How much can be delegated as a serving optimization?
- **Providing placeholders and fallbacks:** How do we replace placeholders and fallbacks?
- **Loaders:** Is there still a way to provide [default loaders](https://github.com/ampproject/amphtml/issues/20237)?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the linked amp-img documentation and review the lazy-loading, aspect-ratio, AMP cache, placeholder, fallback, and default-loader references. Done means identifying the minimal critical feature set, tracking browser support, and resolving the open questions well enough to document a deprecation strategy.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
frontend, performance, web-dev
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.