You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have created an <img> tag with the attributes alt, decoding, fetchpriority and loading. When NextGenImages converts the image to the WebP all of these attributes are being transfered over to the <source> element which holds the WebP image:
As per the HTML spec, this isn't allowed. The <source> HTML element only allows the media, sizes, src, srcset and type attributes. See below screenshot from the W3 HTML validator.
Would it be possible to change the NextGenImages implementation to filter out all invalid HTML attributes, thus making the HTML valid again?
The text was updated successfully, but these errors were encountered:
hd-jeroen
changed the title
<img> attributes are being transfered to the <source> tag, which isn't always allowed
<img> attributes are being transfered to the <source> tag, rendering invalid HTML
Aug 5, 2024
I have created an
<img>
tag with the attributesalt
,decoding
,fetchpriority
andloading
. When NextGenImages converts the image to the WebP all of these attributes are being transfered over to the<source>
element which holds the WebP image:As per the HTML spec, this isn't allowed. The
<source>
HTML element only allows themedia
,sizes
,src
,srcset
andtype
attributes. See below screenshot from the W3 HTML validator.Would it be possible to change the NextGenImages implementation to filter out all invalid HTML attributes, thus making the HTML valid again?
The text was updated successfully, but these errors were encountered: