dev-master
9999999-devResponsive Image module for SilverStripe.
MIT
The Requires
by Joe Madde
by Mitch Viner
responsive image silverstripe
Responsive Image module for SilverStripe.
Responsive Image module for SilverStripe implementing the bottom-padding technique, (*1)
Any pages that are using the ResponsiveImage DataObject will need to include the following JS CSS on your site -, (*2)
Requirements::javascript('SilverStripe/Responsive-Image/javascript/responsive-img.js'); Requirements::css('SilverStripe/Responsive-Image/css/responsive-img.css');
Instead of using the Image Object types on your page, use ResponsiveImage. ex., (*3)
private static $has_one = array( 'HeroImage' => 'ResponsiveImage' );
Inside your Templates, to render the proper output you would then call -, (*4)
$HeroImage.Responsive
This Module was written and inspired from the padding-bottom hack that is documented at -, (*5)
http://www.smashingmagazine.com/2013/09/16/responsive-images-performance-problem-case-study/, (*6)
Responsive Image module for SilverStripe.
MIT
responsive image silverstripe