Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias-kuendig committed Oct 28, 2016
2 parents 02e8435 + 29ef709 commit c47bd06
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ This is useful if you are using a plugin like [jQuery.lazyLoad](http://www.appel

If your plugin requires an alternative srcset attribute (like [verlok/LazyLoad](https://github.com/verlok/lazyload)) this can also be specified via the backend settings.


### Global `class` attributes

If you want to add a class to every processed image you can configure this via the backend settings.

This is useful if you want to add Bootstrap's `img-responsive` class to all images on your website.

## Test results

I have tested this plugin on a page with 20 hd wallpapers from pixabay.
Expand Down
8 changes: 8 additions & 0 deletions classes/ImageResizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ class ImageResizer extends Resizer
*/
public function getWidth()
{
// This call is needed since Build 370 when the new getWidth
// method was introduced and conflicted with this implementation.
// We can now use the parent's getWidth method if it is available.
// For older versions of october the width property gets returned.
if (is_callable('parent::getWidth')) {
return parent::getWidth();
}

return $this->width;
}
}
1 change: 1 addition & 0 deletions updates/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
1.0.3: Added alternative-src config option to support jQuery.lazyLoad plugin
1.0.4: Fixed handling of filenames containing spaces (Thanks to webeks!)
1.1.0: Added settings page, support for lazy-loading plugins and responsive class attributes
1.1.1: Added compatibility with current edgeUpdate builds

0 comments on commit c47bd06

Please sign in to comment.