WPP-Public / akqa-nz-silverstripe-responsive-images

Provides support for configurable sets of responsive images using Javascript
GNU General Public License v2.0
54 stars 26 forks source link

Work with higher level resize methods instead of getFormattedImage #18

Closed stecman closed 6 years ago

stecman commented 8 years ago

17 raises an issue where a generate*Image method in a module has arguments that differ to the template-facing API, causing incorrect behaviour when used in a responsive image set. The arguments for the image resize methods exposed in templates ($Image.CroppedImage, $Image.PaddedImage, etc) are more appropriate for configuration via YAML as their parameters must be scalar to be used in a template.

This change has the bonus of keeping the configuration API for this module consistent with use of image resize methods in templates, rather than the potentially different internal API of an image resize method.

xini commented 6 years ago

Any chance we can get this merged? Cheers

lucasfrey commented 6 years ago

Hey @stecman,

Any reason why we haven't merged that back in the days ?

stecman commented 6 years ago

@lucasfrey looks like this was merged via https://github.com/heyday/silverstripe-responsive-images/pull/19, but GitHub hasn't figured that out because Loz rebased my commit. Closing :+1:

xini commented 6 years ago

This is not solved for the SS3 compatible version. Any chance we can get this merged?

stecman commented 6 years ago

Thanks @xini, I missed that before. I've tested and merged this (had some conflicts), and released as 1.0.1.

xini commented 6 years ago

Thanks so much!