Update 02_Images.md

This commit is contained in:
Steve Boyd 2021-07-09 10:03:44 +12:00 committed by GitHub
parent 8225b2e890
commit 03b43227a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -204,7 +204,7 @@ SilverStripe\Core\Injector\Injector:
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, you can call `$MyImage.setLazyLoad(0)`.
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`: