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

Image size attributes after uploading image #14531

Closed
Tracked by #14146
mmotyczynska opened this issue Jul 4, 2023 · 1 comment
Closed
Tracked by #14146

Image size attributes after uploading image #14531

mmotyczynska opened this issue Jul 4, 2023 · 1 comment
Assignees
Labels
package:image squad:core Issue to be handled by the Core team. type:task This issue reports a chore (non-production change) and other types of "todos".

Comments

@mmotyczynska
Copy link
Contributor

Provide a description of the task

Currently, we set width and height attributes on images when we add them in the editor (intrinsic sizes). We also set image attributes when, for example, we copy an image from Office. When such an image is uploaded to the server and comes back with the suggested width, it can happen that the aspect ratio is broken (new width does not match the original height).

Scope of this ticket: Check and decide whether we should keep the initial sizes or the sizes that come from the server. Although it seems to make sense to set new sizes (returned from the server) if the initial sizes are just original (intrinsic) sizes, this isn't necessarily the case if, for example, the user copies the resized image from Office (the user might expect the Office sizes to remain untouched).

A test case:

  1. Copy the content of this file
    word.docx
  2. Paste into http://localhost:8125/ckeditor5-image/tests/manual/imagesizeattributes.html manual test (it has paste from office and easy image plugins).

Instead of sizes from the Office:
image

We get this:
image

📃 Other details

  • Browser: …
  • OS: …
  • CKEditor version: …
  • Installed CKEditor plugins: …
@mmotyczynska mmotyczynska added type:task This issue reports a chore (non-production change) and other types of "todos". package:image squad:core Issue to be handled by the Core team. labels Jul 4, 2023
@mmotyczynska mmotyczynska self-assigned this Jul 4, 2023
@mmotyczynska
Copy link
Contributor Author

Decision: we should keep the sizes from the Office.

@CKEditorBot CKEditorBot added the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Jul 5, 2023
@CKEditorBot CKEditorBot added status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. and removed status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. labels Jul 10, 2023
arkflpc added a commit that referenced this issue Jul 12, 2023
…er-image-upload

Task (image): The image width should not be changed after uploading if the width or height was previously set. Closes #14531.
@arkflpc arkflpc closed this as completed Jul 13, 2023
@CKEditorBot CKEditorBot removed the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Jul 13, 2023
@CKEditorBot CKEditorBot added this to the upcoming milestone Jul 13, 2023
@CKEditorBot CKEditorBot modified the milestones: upcoming, iteration 67 Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:image squad:core Issue to be handled by the Core team. type:task This issue reports a chore (non-production change) and other types of "todos".
Projects
None yet
Development

No branches or pull requests

3 participants