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

Images aren´t displayed correctly in IE 11 #2

Closed DTM-TYPO3 closed 7 years ago

DTM-TYPO3 commented 7 years ago

Hello,

I´ve got an TYPO3 8.7.3 installation with your newest SMS extension. Images are shown correctly in Firefox and Chrome but Internet Explorer 11 is having a problem with the img-tag and doesn´t show the image at all. Maybe it´s because the src-attribute (as fallback) is missing? Could you please fix that issue?

Thanks in advance, Stefanie

s2b commented 7 years ago

Hello Stefanie,

you're correct that IE 11 doesn't show the images by default because they lack a src attribute. There are two possible ways you can fix that:

  1. Recommended: Include picturefill into your website. This polyfill will implement the missing responsive images functionality in older browsers.
  2. Tell the ViewHelper to render standard-compliant HTML markup instead of the markup suggested by picturefill. You can enable this by setting the picturefill attribute of the ViewHelper to false.

The reason why I implemented the ViewHelper this way is that standard compliant markup, while working better on older browsers, behaves worse on modern browsers. This would mean that modern browsers (which support responsive images on their own) would in some cases load images twice.

I hope this helps.

Simon