sitegeist / sms-responsive-images
Provides ViewHelpers and configuration to render valid responsive images based on TYPO3's image cropping tool.
Installs: 385 806
Dependents: 2
Suggesters: 0
Security: 0
Stars: 34
Watchers: 13
Forks: 19
Open Issues: 14
Type:typo3-cms-extension
Requires
- typo3/cms-core: ^12.2 || ^11.5 || ^10.4
Requires (Dev)
- editorconfig-checker/editorconfig-checker: ^10.0
- sbuerk/typo3-cmscomposerinstallers-testingframework-bridge: ^0.1.2
- squizlabs/php_codesniffer: ^3.0
- typo3/testing-framework: ^7.0 || ^6.0 || dev-main
This package is auto-updated.
Last update: 2024-12-10 23:31:13 UTC
README
Responsive Images for TYPO3
This TYPO3 extension provides ViewHelpers and configuration to render valid responsive images based on TYPO3's image cropping tool.
Authors & Sponsors
- Simon Praetorius - praetorius@sitegeist.de
- All contributors
The development and the public-releases of this package is generously sponsored by my employer https://sitegeist.de.
Installation
This extension is available via packagist.
composer require sitegeist/sms-responsive-images
Alternatively, you can install the extension from TYPO3 TER:
TYPO3 TER: sms_responsive_images
For further instructions, please take a look at the full documentation.
Updating from 2.x
- Support for TYPO3 9.5 and PHP < 7.4 is gone.
- If you still include
constants.ts
andsetup.ts
manually in your TypoScript configuration, these files have now been renamed toconstants.typoscript
andsetup.typoscript
. - Since TYPO3 v12
has declared all ViewHelper classes as
final
, this has been applied to the responsive images ViewHelpers as well.
Updating from 1.x
There are a few breaking changes which might require you to update your integration:
- Support for TYPO3 8.7 is gone. Please use version 1.3 of the extension.
- The
picturefill
attribute of<sms:image />
and<sms:media />
has been removed, so you need to remove it from your Fluid templates. Separate markup for picturefill.js is no longer required, so the extension now outputs standards-compliant markup at any time. - In addition to svg files, gif files are now excluded as well. You can change this by
adjusting the
ignoreFileExtensions
parameter. - If
lazyload
is enabled, image tags will get aclass="lazyload"
automatically.
There are also some changes under the hood you might want to consider:
- The PHP namespace has switched from
SMS\SmsResponsiveImages
toSitegeist\ResponsiveImages
, so if you extended one of the provided PHP classes, you need to adjust this. - The extension now uses
.1579774724
instead of.100
to overwrite the image partial of fluid_styled_content. This means that there will be less interference with other extensions. However, if you need to overwrite theImage.html
file again, you need to specify your partial after that value. - The demo plugin is gone, so if you were using it, it won't work anymore.
Documentation
To get an overview of responsive images in general and what the extension does, take a look at the following blog post:
sitegeist Techblog: Responsive Images with TYPO3 8.7+
You will find the full documentation for this extension on typo3.org: