img要素にdecoding属性をつけるとvalidator.nuで以下のエラーが出ます。decoding属性を消すとこのエラーはなくなります。
Error: Attribute decoding not allowed on element img at this point. From line 22, column 70; to line 22, column 165 href="#"><img class="image logo__image" src="/assets/images/logo.png" alt="The Company" decoding="async"></a></ Attributes for element img: Global attributes alt — Replacement text for use when images are not available src — Address of the resource srcset — Images to use in different situations (e.g. high-resolution displays, small monitors, etc) sizes — Image sizes for different page layouts crossorigin — How the element handles crossorigin requests usemap — Name of image map to use ismap — Whether the image is a server-side image map width — Horizontal dimension height — Vertical dimension referrerpolicy — Referrer policy for fetches initiated by the element decoding — Decoding hint to use when processing this image for presentation
Attributes for element img:
の部分でdecoding属性も挙げられているのにエラーが出るので不思議です。これはなぜで、またどうしたら改善できるのでしょうか?
あなたの回答
tips
プレビュー