mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #9995 from creative-commoners/pulls/4/lazy-load-docs
Add docs for lazy loading
This commit is contained in:
commit
436678209e
@ -200,6 +200,19 @@ SilverStripe\Core\Injector\Injector:
|
||||
Quality: 90
|
||||
```
|
||||
|
||||
### Lazy Loading
|
||||
|
||||
Images added via the WYSIWYG editor and as objects on templates are [lazy loaded](https://developer.mozilla.org/en-US/docs/Web/Performance/Lazy_loading) by default.
|
||||
|
||||
To disable lazy loading for an individual image with a template, you can call `$MyImage.LazyLoad(false)`.
|
||||
|
||||
You can opt out of lazy loading globally by setting the `Image::lazy_loading_enabled` config to `false`, see example `yml`:
|
||||
|
||||
```yml
|
||||
SilverStripe\Assets\Image:
|
||||
lazy_loading_enabled: false
|
||||
```
|
||||
|
||||
## Changing the manipulation driver to Imagick
|
||||
|
||||
If you want to change the image manipulation driver to use Imagick instead of GD, you'll need to change your config so
|
||||
|
Loading…
Reference in New Issue
Block a user