Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC Stop implying we don't support webp out of the box #546

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
```
Loading