Closed devjayantmalik closed 1 year ago
Hey @devjayantmalik! 👋🏻
I don't believe we want to have this feature in this package. As the name suggests, we want to keep it light.
There are already community packages that do this if you would like to use this feature.
Coming to my mind:
Thanks @RomainLanz I would then create a new package for this. Thanks for the time. Just wanted to tell everyone that other packages mentioned above have bugs in them. So, Not considering them. It looks like I should close the PR now. Thanks everyone for your time and wish our community a good time. Looking forward for any contributions feasible from my side.
Just wanted to tell everyone that other packages mentioned above have bugs in them.
Why not try to fix the bugs in them instead of creating a new package? 😄
Proposed changes
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.
Recently I have facing an issue where users upload images such as user avatar, we need to compress and downscale them to our custom resolution. This feature is not yet available in attachment-lite. I have added the feature with opt-in behavior, which means user can choose to use the feature by providing
variants
option in@attachment
decorator.Along with the above change I have also made few more changes in the package:
With the introduction of the feature the code will look something like this:
Types of changes
What types of changes does your code introduce?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...
I also considered other alternatives such as https://www.npmjs.com/package/@jrmc/attachment-advanced But found few issue in those:
Incase community feels like this should be part of core package, I would be happy to update documentation and contribute.