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

[Proposal] Feature Discussion From Our Fork #374

Open
angelo-hub opened this issue Nov 30, 2021 · 3 comments
Open

[Proposal] Feature Discussion From Our Fork #374

angelo-hub opened this issue Nov 30, 2021 · 3 comments

Comments

@angelo-hub
Copy link
Contributor

angelo-hub commented Nov 30, 2021

Currently we have an internal fork we're discussing making public, and would like to contribute back to the project.

The following changes have been added:

  1. Improved memory management on http sources using a HEAD method request to make a proper sized Go buffer
  2. Direct S3 source support
  3. Ability to sit in front of a bucket/S3 origin to perform transforms
    • includes mocking of public bucket access by using the standard HTTP source and appending indexes to a startup argument for a mockHost URL
  4. Improved content negotiation (determines best format based on if the source image has an alpha channel)
  5. Restructured the project to no longer be a flat package main structure [sources package, image package, logger package, server package, and entities package]
  6. Optional Whitelisting of height and width values to decrease DDoS ability, server options to enforce a max image size
  7. Server option to enforce lowercase/sorted query strings for more consistent CDN cache hits

EDIT:

  1. Addition of a trim algorithm that runs first in the pipeline, then re-ran for proper resizing (w/o this bimg will resize the image to your specs, then trim resulting in an image size you may have not wanted, expected behavior should be 1) trim, 2) then resize to the width/height request

If any of these changes would interest you guys as maintainers I'm sure they can be brought in as piece meal.

@angelo-hub angelo-hub changed the title [Proposal] Feature Proposals: [Proposal] Feature Discussion From Our Fork Dec 3, 2021
@h2non
Copy link
Owner

h2non commented Dec 8, 2021

Thanks for the proposal, I think many of these features are well seasoned and will be warmly welcomed by users!

So definitively, it would be great if all these improvements can be merged into imaginary without splitting efforts in different projects and while also having a quicker impact on the existing users base.

I personally don't have much time to do OSS lately, but I'm happy to ship these features in a future v2 major release, so even larger or breaking changes can be shipped without much pain. FYI, just created the new branch.

Would you or your organization be interested in becoming contributors? I can invite you, otherwise, PRs will work too.
Also, we can place a cost-free sponsorship banner in the Readme.

@angelo-hub
Copy link
Contributor Author

angelo-hub commented Dec 8, 2021

I'll let you know! @h2non thanks for responding, I'd definitely be interested in helping out on my personal time, need to make sure that's okay when working with org code.

We did some major reworks to the API which is why we'd probably have to make this changes added piece meal and then update them.

One example of this is we changed the middleware from /action_performed to a query string param using ?action=action_performed plus we straight up deleted the middlewares we didn't need, but the changes I listed with some dedicated time should be portable to the imaginary project. Just requires some dev time.

@suntong
Copy link

suntong commented Dec 1, 2023

Any update on this please @angelo-hub?

@h2non,

I personally don't have much time to do OSS lately, but I'm happy to ship these features in a future v2 major release

I've gathered some useful PRs and merged them together, fixing all the merge issues, and the end result is: https://github.com/suntong/imaginary/commits/dev (the commit logs had the merged PRs before, but they're all gone after your taking #353 and me doing a rebase on that).

Take a look and let me know if you want me to send in a PR.

Thanks

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

No branches or pull requests

3 participants