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 18 forks source link

for lazyload it doesn't give class of lazyload to img tag #26

Closed dextar47 closed 4 years ago

dextar47 commented 6 years ago

Hi, If i enable lazyload from constant editor then it adds data-srcset attribute which is fine, but it doesn't add lazyload class to the img tag. i have to add it via typoscript using lib.contentelement.settings.responsivexyz.class = lazyload. i think most of the lazyload libraries work with lazyload class so when lazyload is enabled from the constant then data + class both things should be done.

fredi1993 commented 5 years ago

I have made a pull request to fix this, but it's only locally for now, don't actually know how to push it so you can check it. You can check it here: https://drive.google.com/file/d/19FhORpFzM9CIKalRmWuZ8cuicHbGJm4r/view?usp=sharing

s2b commented 5 years ago

Thank you for your contribution. I already thought about adding the class name automatically. However, this would be a breaking change as it could have direct consequences on existing installations of the extension.

I will revisit this when I start working on the next major version of the extension. Until then, you need to specify the class manually (in TypoScript for default content elements and when calling the viewhelpers manually).

s2b commented 4 years ago

This is already fixed in develop and will be part of v2