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

Image2 could have limiter for resizing image to specified maximum #2048

Closed
jswiderski opened this issue Jun 4, 2018 · 1 comment · Fixed by #2683
Closed

Image2 could have limiter for resizing image to specified maximum #2048

jswiderski opened this issue Jun 4, 2018 · 1 comment · Fixed by #2683
Assignees
Labels
status:confirmed An issue confirmed by the development team. support:3 An issue reported by a commercially licensed client. target:major Any docs related issue that should be merged into a major branch. type:feature A feature request.
Milestone

Comments

@jswiderski
Copy link
Contributor

Type of report

Feature request

Provide description of the new feature

Originally reported here: https://dev.ckeditor.com/ticket/12701

Image2 could have an extra setting or field in dialog for defining maximum resize size. If doing that inside the dialog, we could have a checkbox (Limit resizer to current image size) or 2 fields for entering max width/height manually. We could also have a configuration option with predefined values e.g. image_size, image_size+20, 200x300.

@lslowikowska lslowikowska added the support An issue reported by a commercially licensed client. label Jun 5, 2018
@msamsel msamsel added type:feature A feature request. status:confirmed An issue confirmed by the development team. labels Jun 7, 2018
@engineering-this engineering-this self-assigned this Dec 12, 2018
@mlewand mlewand added the target:major Any docs related issue that should be merged into a major branch. label Dec 12, 2018
@mlewand
Copy link
Contributor

mlewand commented Dec 12, 2018

It make sense to put it as a config option.

Rather than string format with <width>x<height> it should accept an object, like:

{
	width: 400,
	height: 300
}

There should be one special case, if you pass values as strings:

{
	width: 'naturalWidth',
	height: 'naturalHeight'
}

It will retain proper values from img.naturalHeight / width.

There's no need for supporting mixing something like 'naturalWidth+20' if ever anyone will need that kind of stuff we'd make a callback for it. But I don't think there's a need for that.

@lslowikowska lslowikowska added support:1 An issue reported by a commercially licensed client. and removed support An issue reported by a commercially licensed client. labels Dec 14, 2018
@mlewand mlewand added this to the 4.12.0 milestone Feb 8, 2019
@lslowikowska lslowikowska added support:3 An issue reported by a commercially licensed client. and removed support:1 An issue reported by a commercially licensed client. labels Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:confirmed An issue confirmed by the development team. support:3 An issue reported by a commercially licensed client. target:major Any docs related issue that should be merged into a major branch. type:feature A feature request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants