Closed leochenftw closed 2 years ago
It would be great to see a companion PR in silverstripe/silverstripe-assets to add this config variable with a default value and PHPdoc, and a unit test added to this PR.
Looks like a useful optimisation for the use case you pointed out. 👍
thanks, @GuySartorelli for your feedback.
Ideally, the default config value should be added under https://github.com/silverstripe/silverstripe-assets, but, it will look confusing if I submit a PR with no_resample
config variable alone over there without the context.
So maybe SS could add that officially?
Ideally, the default config value should be added under https://github.com/silverstripe/silverstripe-assets, but, it will look confusing if I submit a PR with
no_resample
config variable alone over there without the context.
If you mention in that PR that it is for this one then they'll be treated together.
corresponding PR made on SS Assets module, at https://github.com/silverstripe/silverstripe-assets/pull/479
I've commented on the admin PR. We need to change the name around to reflect the default and then update this PR to reflect that. Happy to merge both when the changes are addressed.
thanks, @michalkleiner . I've made the changes as you suggested.
Cheers
Looking good now @leochenftw. Can you please swap the order of the conditions on one of the touched rows and then squash your commits into one "ENH Allow developers to decide if resampling is needed". I'll be happy to merge it after that.
thanks @michalkleiner - is it possible for you to do the squash upon merge? I recently returned the laptop that I was doing the dev work on, so it will be easier to do it that way
Thanks for helping with the squash, Dan, I need to look myself into how to push to fork's PR branches.
@michalkleiner as long as the contributor has allowed maintainers to push to their PRs it's as simple as git p [-f] https://github.com/their/repo HEAD:their-branch
Sometimes, you just don't need the CMS to resample the images (e.g. when using S3 module + lambda resizing)