silverstripe-framework/docs/en/04_Changelogs/4.9.0.md
2021-08-16 10:39:41 +12:00

3.5 KiB

4.9.0 (Unreleased)

Overview

Features and enhancements

Image lazy loading

Silverstripe CMS now lazy loads most images by default and includes some options to opt-out of this behaviour.

Image lazy loading defers the loading of images not in the viewport to improve the initial page load performance. Read more about (image lazy-loading)[https://web.dev/browser-level-image-lazy-loading/].

This feature was implemented in partnership with Google.

Most images will now get the loading="lazy" attribute added to them. This includes:

  • images added via the HTML Editor's insert media button
  • image DataObjects added to templates

Image HTML tags (<img>) added in templates will not be lazy loaded by default.

To disable lazy loading for an individual image in a template, use $MyImage.LazyLoad(false).

There's some scenarios where you might not want to use the native Silverstripe CMS lazy loading. For example, you might already have a custom lazy loading implementation.

To opt out of lazy loading globally, use the following yml config:

SilverStripe\Assets\Image:
  lazy_loading_enabled: false

CMS authors

CMS authors can disable lazy loading on images added via the WYSIWYG editor in the "Edit image" panel by setting the new "Loading" field to "Eager".

Manage your CMS sessions across devices

The session manager module is a new security focused feature which allows a CMS user to view and manage their active sessions in the CMS within the "My profile" section of the CMS (/admin/myprofile). They can see the device details behind each session and have the ability to revoke these sessions. This new module has been added to silverstripe/recipe-cms which is the recommended method of managing Silverstripe CMS dependencies in a project.

Projects that have silverstripe/recipe-cms as a requirement in their composer.json will automatically get silverstripe/session-manager when you run composer update. If your project does not use silverstripe/recipe-cms, it's recommended that you require silverstripe/session-manager in your composer file as a security enhancement. The session manager module requires no configuration and works out-of-the-box.

If your site has the symbiote/silverstripe-queuedjobs module installed, then a job will automatically be created that will periodically remove old database records created by the session manager module.

CMS users can review the Session Manager user help for more information on managing their sessions.

Other new features

Bugfixes

This release includes a number of bug fixes to improve a broad range of areas. Check the change logs for full details of these fixes split by module. Thank you to the community members that helped contribute these fixes as part of the release!