img decoding async/sync/auto Hint
Resolves img decoding sync, async or auto hints with auto as missing and invalid default. Actual decoding strategy remains a user-agent decision.
Description
An image decoding hint suggests synchronous, asynchronous or automatic decoding.
An image decoding hint suggests synchronous, asynchronous or automatic decoding. Decoding concerns making pixels available and differs from when the resource is fetched.1
The tool returns state, validKeyword. The fields describe the supplied local pattern or effective state, or contain the formatted markup shown below.
When to use img decoding async/sync/auto Hint
Use this for the following task: Resolves img decoding sync, async or auto hints with auto as missing and invalid default. Actual decoding strategy remains a user-agent decision. Provide the requested local fields extracted from the relevant element or attribute.
How to use img decoding async/sync/auto Hint and understand its results
- Prepare the parsed element names, attribute values or direct element-child lists requested below. Keep attribute presence separate from its value.
- Enter present, value according to the field table, then run the tool.
- Read state, validKeyword. Check the effective state, recognized-token flags or generated markup against the rules below.
- Correct any reported local mismatch and check the resulting markup in its intended document and browser context.
| Input field | Meaning | Value type and bounds | Requirement |
|---|---|---|---|
| present | Present | boolean | Required |
| value | Value | string; maximum text length 100000 | Required |
Supply presence and value. Match the three keywords after ASCII case folding, return the state and a present-keyword validity flag.
present sync/async/auto → itself; absent/invalid → auto The symbols and boundary conditions refer to the supplied fields and the implementation described above.
| Output field | Meaning | Value type |
|---|---|---|
| state | State | string |
| validKeyword | Valid Keyword | boolean |
{
"input": {
"present": true,
"value": "ASYNC"
},
"output": {
"state": "async",
"validKeyword": true
}
} Limitations and assumptions
The present flag distinguishes an absent attribute from a present empty value. Keyword matching folds ASCII uppercase without trimming. Actual decoding remains a user-agent decision; no image data is decoded.
The tool does not fetch a page, run a browser or validate an entire HTML document. Malformed tool requests produce input errors; valid requests can still report unrecognized values or failed local checks.
Alternative or Complementary methods
Choose img loading eager/lazy Default when you need its operation: Resolves img loading keywords with eager as both missing and invalid default. This reports the hint and does not guarantee actual lazy deferral. Choose source type codecs Parameter Lookup for the complementary operation: Builds a source MIME type with a quoted codecs parameter from a restricted codec-identifier profile (ASCII letters, digits, dot, underscore and hyphen). It does not identify or guarantee browser codec support.
Background reference: HTML Standard: img decoding async/sync/auto Hint.
References
Similar or alternative tools
- img loading eager/lazy Default
Resolves img loading keywords with eager as both missing and invalid default. This reports the hint and does not guarantee actual lazy deferral.
- source type codecs Parameter Lookup
Builds a source MIME type with a quoted codecs parameter from a restricted codec-identifier profile (ASCII letters, digits, dot, underscore and hyphen). It does not identify or guarantee browser codec support.