Skip to content

Commit

Permalink
Fix incorrect extension being loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
gmlnchv committed Feb 25, 2019
1 parent a2a56a4 commit df4895e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 30 deletions.
4 changes: 2 additions & 2 deletions _config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Name: lazyloadedimage

SilverStripe\Assets\Image:
extensions:
- DNADesign\LazyloadedImage\LazyloadedImageExtension
- DNADesign\Images\Extensions\LazyloadedImageExtension

SilverStripe\Assets\Storage\DBFile:
extensions:
- DNADesign\LazyloadedImage\LazyloadedImageExtension
- DNADesign\Images\Extensions\LazyloadedImageExtension
19 changes: 0 additions & 19 deletions src/LazyloadedImage.php

This file was deleted.

18 changes: 9 additions & 9 deletions src/extensions/LazyloadedImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

class LazyloadedImageExtension extends Extension
{
public function getLazyloaded()
{
Requirements::javascript('dnadesign/silverstripe-lazyloaded-image:client/javascript/lazysizes.min.js');
Requirements::javascript('dnadesign/silverstripe-lazyloaded-image:client/javascript/ls.blur-up.min.js');
Requirements::css('dnadesign/silverstripe-lazyloaded-image:client/css/lazysizes-blur.css');
public function getLazyloaded()
{
Requirements::javascript('dnadesign/silverstripe-lazyloaded-image:client/javascript/lazysizes.min.js');
Requirements::javascript('dnadesign/silverstripe-lazyloaded-image:client/javascript/ls.blur-up.min.js');
Requirements::css('dnadesign/silverstripe-lazyloaded-image:client/css/lazysizes-blur.css');

return $this->owner->customise([
'LQIP' => $this->owner->Quality(20)
])->renderWith('Includes/LazyloadedImage');
}
return $this->owner->customise([
'LQIP' => $this->owner->Quality(20)
])->renderWith('Includes/LazyloadedImage');
}
}

0 comments on commit df4895e

Please sign in to comment.