From e05fed46ea298a0237e91a7f80d69ead69c60125 Mon Sep 17 00:00:00 2001 From: Maxime Rainville Date: Thu, 14 Apr 2022 11:47:47 +1200 Subject: [PATCH] DOC Add changelog entry for WebP support --- docs/en/04_Changelogs/4.11.0.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docs/en/04_Changelogs/4.11.0.md b/docs/en/04_Changelogs/4.11.0.md index 1423cbcfe..262e21ad7 100644 --- a/docs/en/04_Changelogs/4.11.0.md +++ b/docs/en/04_Changelogs/4.11.0.md @@ -5,6 +5,7 @@ - [Regression test and Security audit](#audit) - [Dropping support for PHP 7.3](#phpeol) - [Features and enhancements](#features-and-enhancements) + - [Upload and use WebP images in the CMS](#webp) - [Preview any DataObject in any admin section](#cms-preview) - [Other features](#other-features) - [Bugfixes](#bugfixes) @@ -23,6 +24,33 @@ In accordance with our [PHP support policy](/Getting_Started/Server_Requirements ## Features and enhancements {#features-and-enhancements} +### Upload and use WebP images {#webp} + +WebP is an alternative image format for displaying picture on websites. It provides generally better results in most use cases to JPEG and PNG. + +Read [An image format for the Web](https://developers.google.com/speed/webp) for more information about WebP. + +WebP has wide – but not universal – support across web browsers. Internet Explorer is the main browser that does not support WebP at this stage. + +Read [Can I use WebP?](https://caniuse.com/webp) to see which browsers can render WebP images. + +Until now, Silverstripe CMS would default to blocking content authors from uploading WebP images. Given that Internet Explorer is soon to be end-of-life and that its market share are now under 1% according to most surveys, we decided the time had come to enable WebP by default in the CMS. + +Once your project is upgraded to Silverstripe Recipe CMS 4.11, your content authors will automatically be able to upload WebP images and add them to web pages. We recommend you have a conversation with your users about the pros and cons of WebP so they can make an informed decisions about when to use this image format. + +If your website still caters to a significant number of visitors with browsers that do not support WebP, you can disable WebP image upload by adding this snippet to your YML config: +```yml +--- +Name: myproject-assetsfiletypes +After: '#assetsfiletypes' +--- +SilverStripe\Assets\File: + allowed_extensions: + webp: false +``` + +Read [Allowed file types](/Developer_Guides/Files/Allowed_file_types) in the Silverstripe CMS documentation for more information on how to enable or disable new image file format. + ### Preview any DataObject in any admin section {#cms-preview} The CMS preview panel has historically been available for `Versioned` `DataObject`s in the Pages admin section. This has now been expanded to allow any `DataObject` (regardless of whether it uses the`Versioned` extension) to be previewed in any section of the CMS.