Missing type attribute for jpg/png images
-
Hello, thank you for the great plugin! ??
But I have one question.
I am using this method “Global (processes the whole output buffer before sending the HTML to the browser) “.
And everything is working fine, BUT as you can see, srcset for ‘jpg’ images does not have any type attribute and I am getting a lot of errors in W3C Markup Validation Service.
<picture class=”sp-no-webp”>
<source srcset=”xxx.webp” type=”image/webp”>
<source srcset=”xxx.jpg”>
xxx
</picture>W3C Error:
“A source element that has a following sibling source element or img element with a srcset attribute must have a media attribute and/or type attribute.”Is there any way how to add type attribute for jpg/png images? Or even media attribute.
Media attribute is working only if I insert image via wp wysiwyg editor.
Thank you!!!
- The topic ‘Missing type attribute for jpg/png images’ is closed to new replies.