Skip to content

Commit

Permalink
DOC Stop implying we don't support webp out of the box (#546)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Jul 10, 2024
1 parent ac65480 commit 4041127
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions en/02_Developer_Guides/14_Files/06_Allowed_file_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ SilverStripe\MimeValidator\MimeUploadValidator:

Silverstripe CMS support JPEG, GIF, PNG and WebP image formats out of the box. Silverstripe CMS can be configured to support other less common image formats (e.g: AVIF). For this to work, your version of PHP and of the [`intervention/image` library](https://intervention.io/) must support these alternative image formats.

For example, this snippet can be added to the configuration of older Silverstripe CMS projects to allow them to work with WebP images.
For example, this snippet can be added to the configuration of older Silverstripe CMS projects to allow them to work with AVIF images.

```yml
---
Expand All @@ -105,20 +105,20 @@ After: '#assetsfiletypes'
---
SilverStripe\Assets\File:
file_types:
webp: 'WebP Image'
avif: 'AVIF Image'
allowed_extensions:
- webp
- avif
app_categories:
image:
- webp
- avif
image/supported:
- webp
- avif
class_for_file_extension:
webp: SilverStripe\Assets\Image
avif: SilverStripe\Assets\Image
SilverStripe\Assets\Storage\DBFile:
supported_images:
- image/webp
- image/avif
---
Name: myproject-mimevalidator
Expand All @@ -128,6 +128,6 @@ Only:
---
SilverStripe\MimeValidator\MimeUploadValidator:
MimeTypes:
webp:
- image/webp
avif:
- image/avif
```

0 comments on commit 4041127

Please sign in to comment.