When specifying an amp-image fallback image according to the amp documentation, the parameter fallback is converted to fallback="true" and amp-validator returns "The attribute 'fallback' in tag 'amp-img' is set to the invalid value 'true'."
<amp-img
alt="Mountains"
width="550"
height="368"
src="https://amp.dev/static/inline-examples/images/mountains.webp"
>
<amp-img
alt="Mountains"
fallback
width="550"
height="368"
src="https://amp.dev/static/inline-examples/images/mountains.jpg"
></amp-img>
</amp-img>
The validation succeeds
The related document
Placeholders & fallbacks - amp.dev
In amp-html, the attributes fallback and placeholder disallow any value.
The cause of this problem is the parser adding true value automatically.
Example was updated recently
@timneutkens
The document about AMP Pages might have to be updated.
Add "" value to the attribute 'fallback' , 'placeholder' and so on.
馃憣
<amp-img
alt="Mountains"
fallback=""
width="550"
height="368"
src="https://amp.dev/static/inline-examples/images/mountains.jpg"
></amp-img>
馃憥
<amp-img
alt="Mountains"
fallback
width="550"
height="368"
src="https://amp.dev/static/inline-examples/images/mountains.jpg"
></amp-img>
Most helpful comment
@timneutkens
The document about AMP Pages might have to be updated.
Add
""value to the attribute 'fallback' , 'placeholder' and so on.馃憣
馃憥