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

Crop by aspect ratio in image editor #666

Open
rawstream opened this issue May 29, 2024 · 4 comments
Open

Crop by aspect ratio in image editor #666

rawstream opened this issue May 29, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@rawstream
Copy link

rawstream commented May 29, 2024

Is your feature request related to a problem? Please describe.
I would like to use the Built-in image editor by passing a cdnUrl that contains a crop operation by aspect ratio.
The operation is ignored and the editor does show the uncropped image instead.

image

Describe the solution you'd like
The Built-in image editor supports 'Crop by aspect ratio'.

@p4m
Copy link

p4m commented May 30, 2024

This would be great if this is resolved.

@nd0ut nd0ut added the enhancement New feature or request label May 30, 2024
@nd0ut
Copy link
Member

nd0ut commented May 30, 2024

Hello! Thanks for feedback.

I have two questions:

  • Should the editor enforce a fixed crop aspect ratio and prevent changes to the aspect ratio during editing?
  • Do you specifically need the resulting URL to contain /crop/16:9/ operation? Would it be acceptable if the crop operation is absolutely positioned in the output URL? For instance, if you provide a URL with /crop/1:1/ and receive a result with /crop/1000x1000/100,0/?

@p4m
Copy link

p4m commented May 30, 2024

  1. With the 'freeform' feature coming in the near future (mentioned by Alex via a personal email message on May 16th), I would expect that the user can change the aspect ratio. When offered different aspect ratios to the user. See below the feature in the Uploadcare docs.
    image
  2. I personally would expect that the crop operation is done like it is now, in the previous widget: cropped in the center of the image, based on the aspect ratio.

@rawstream
Copy link
Author

Hi @nd0ut ,
Thanks for your response.

Should the editor enforce a fixed crop aspect ratio and prevent changes to the aspect ratio during editing?

I don't think this should be the default behaviour.

Do you specifically need the resulting URL to contain /crop/16:9/ operation? Would it be acceptable if the crop operation is absolutely positioned in the output URL? For instance, if you provide a URL with /crop/1:1/ and receive a result with /crop/1000x1000/100,0/?

It would definitely be acceptable if the crop operation is absolutely formatted in the output URL.
The main issue is that the editor currently does not recognize /crop/16:9. The format of the output URL after editing doesn't really matter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

3 participants