Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH Allow developers to decide if resampling is needed #1252

Merged
merged 1 commit into from
Apr 2, 2022

Conversation

leochenftw
Copy link
Contributor

Sometimes, you just don't need the CMS to resample the images (e.g. when using S3 module + lambda resizing)

@leochenftw leochenftw changed the title Adding no_resample config Allow develoepers to decide if resampling is needed... Feb 19, 2022
@GuySartorelli
Copy link
Member

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. 👍

@leochenftw
Copy link
Contributor Author

leochenftw commented Feb 19, 2022

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?

@GuySartorelli
Copy link
Member

GuySartorelli commented Feb 19, 2022

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.

@leochenftw
Copy link
Contributor Author

corresponding PR made on SS Assets module, at silverstripe/silverstripe-assets#479

@michalkleiner
Copy link
Contributor

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.

@leochenftw
Copy link
Contributor Author

thanks, @michalkleiner . I've made the changes as you suggested.

Cheers

@leochenftw leochenftw changed the base branch from 1.10 to 1 February 20, 2022 19:11
@michalkleiner
Copy link
Contributor

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.

@leochenftw
Copy link
Contributor Author

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

@michalkleiner
Copy link
Contributor

Thanks for helping with the squash, Dan, I need to look myself into how to push to fork's PR branches.

@michalkleiner michalkleiner changed the title Allow develoepers to decide if resampling is needed... ENH Allow developers to decide if resampling is needed Apr 2, 2022
@michalkleiner michalkleiner merged commit d3c58c7 into silverstripe:1 Apr 2, 2022
@dhensby
Copy link
Contributor

dhensby commented Apr 3, 2022

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants