sitegeist / sms-responsive-images

This TYPO3 extension provides ViewHelpers and configuration to render valid responsive images based on TYPO3's image cropping tool.
GNU General Public License v2.0
34 stars 19 forks source link

error in validator.w3.org because of missing src-attribut #29

Closed lexi80 closed 6 years ago

lexi80 commented 6 years ago

Is it possible to add the src-attribut to viewhelper? it causes an error on https://validator.w3.org "Element img is missing required attribute src."

s2b commented 6 years ago

Yes, this is possible. Just have a look at the picturefill attribute of the ViewHelpers. It is set to true by default which means that the extension generates the markup recommended by picturefill.js. If you set the attribute to false, the src attribute will be present.

Note that you can also set the value globally for all standard content elements via TypoScript:

lib.contentElement.settings.tx_smsresponsiveimages.picturefill = 0

https://docs.typo3.org/typo3cms/extensions/sms_responsive_images/DeveloperManual/Index.html#picturefill