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 used full size image during
uploading to should 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.
--
Ticket URL: <http://dev.ckeditor.com/ticket/13520>
CKEditor <http://ckeditor.com/>
The text editor for the Internet
Comment (by pjasiun):
See http://stackoverflow.com/questions/31192213/ckeditor-4-5-drag-and-
drop-image-upload-how-to-return-new-dimensions-in-json-r
--
Ticket URL: <http://dev.ckeditor.com/ticket/13520#comment:1>
* version: 4.5.1 =>
--
Ticket URL: <http://dev.ckeditor.com/ticket/13520#comment:2>
Old description:
> 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 used full size image during
> uploading to should 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.
New description:
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.
--
--
Ticket URL: <http://dev.ckeditor.com/ticket/13520#comment:3>
* status: new => confirmed
* version: => 4.5.0
--
Ticket URL: <http://dev.ckeditor.com/ticket/13520#comment:4>
Comment (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.
--
Ticket URL: <http://dev.ckeditor.com/ticket/13520#comment:5>
* type: Bug => New Feature
--
Ticket URL: <http://dev.ckeditor.com/ticket/13520#comment:6>
Comment (by Reinmar):
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?
--
Ticket URL: <http://dev.ckeditor.com/ticket/13520#comment:7>
Comment (by pjasiun):
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.
--
Ticket URL: <http://dev.ckeditor.com/ticket/13520#comment:8>
Comment (by Reinmar):
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.
--
Ticket URL: <http://dev.ckeditor.com/ticket/13520#comment:9>
* status: confirmed => closed
* resolution: => invalid
Comment:
I reported #13794.
--
Ticket URL: <http://dev.ckeditor.com/ticket/13520#comment:10>