Opened 3 years ago

Closed 3 years ago

#13520 closed New Feature (invalid)

Set max width and height of the uploading image

Reported by: Piotr Jasiun Owned by:
Priority: Normal Milestone:
Component: General Version: 4.5.0
Keywords: Cc:

Description (last modified by Piotr Jasiun)

It should be possible to set maximum width and height of the uploading image. There should be a configuration option to defined max width and height of the image for upload image plugin. This option should be read in the upload image plugin and set additional parameters for the request (using feature introduces in #13518).

Upload image has to handle response with the width and height too. Now when the image is uploaded it has the same dimensions as the uploading image, see onUploaded method in the upload image definition, in uploadimage plugin. If server return new dimensions they should be used instead original dimensions. It should be possible to get them thanks to #13519.

Additionally it makes no sens to show user full size image during uploading to show him miniature when the upload is done. CKEditor should calculate image dimensions and set the proper dimensions at the begging. Then when the upload is done CKEditor should use dimensions from the server anyway.

Change History (10)

comment:2 Changed 3 years ago by Piotr Jasiun

Version: 4.5.1

comment:3 Changed 3 years ago by Piotr Jasiun

Description: modified (diff)

comment:4 Changed 3 years ago by Jakub Ś

Status: newconfirmed
Version: 4.5.0

comment:5 Changed 3 years ago by datalink

First: the plugin should respect config.image_prefillDimensions = false;

Second: I upload big sized images and resize it to different images server side. I think many users will upload images with sizes like 2000x1500 pixels. The preview of the image while uploading should also have a maximum width.

Third: For combination of image_prefillDimensions=false and returning width/height in the response, there should be an "update image size" function for new width/height without attributes.

comment:6 Changed 3 years ago by Piotrek Koszuliński

Type: BugNew Feature

comment:7 Changed 3 years ago by Piotrek Koszuliński

I think that this ticket unnecessarily merges maximum size and support for data.width and data.height options in the response. The latter is more general (can be used in various ways), while the whole "maximum size" handling (also of the preview) is a whole different topic which can e.g. be handled by CSS. Therefore, I would split these tickets and have the support for data.width/height added to 4.6.0. WDYT?

comment:8 Changed 3 years ago by Piotr Jasiun

These two thinks are related. If you only set the width/height from the response and leave the original size in the preview you will have very bad UX: dropped image will became big and then small when the uploading is done.

comment:9 Changed 3 years ago by Piotrek Koszuliński

I believe that we agreed that it's a matter of writing a plugin which will handle this (preview + result) and sync those things with the server. We have to make this possible, but we don't have to do it. So it seems that #13519 and #13519 miss one thing – support for data.width/height. The rest, for example the way how you create a placeholder image, will be a job for your plugin.

comment:10 Changed 3 years ago by Piotrek Koszuliński

Resolution: invalid
Status: confirmedclosed

I reported #13794.

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy