#13794 closed New Feature (fixed)
[UploadImage] Use uploaded.width/height if set
| Reported by: | Piotrek Koszuliński | Owned by: | Tomasz Jakut |
|---|---|---|---|
| Priority: | Normal | Milestone: | CKEditor 4.6.0 |
| Component: | General | Version: | 4.5.0 |
| Keywords: | Cc: | porjo |
Description
Change History (7)
comment:1 Changed 10 years ago by
| Status: | new → confirmed |
|---|
comment:2 Changed 10 years ago by
| Owner: | set to Tomasz Jakut |
|---|---|
| Status: | confirmed → assigned |
comment:3 Changed 10 years ago by
| Status: | assigned → review |
|---|
comment:4 Changed 10 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | review → closed |
Added with git:59944a6499aa7debf253e5e0edc8361ce95b2ac9.
comment:5 Changed 9 years ago by
I would propose to reopen this ticket. Currently, onUploaded sets image width & height if non-empty values are returned from server, otherwise it sets $img.naturalWidth & $img.naturalHeight. But I think it should be a valid scenario to NOT set width/height, e.g. to allow for responsive images (those with max-width=100% in the CSS).
In case of traditionally uploaded image, config.image2_prefillDimensions setting serves exactly this purpose. In case of dropped upload, however, this setting has no effect. So imho either the same setting should be also obeyed by onUploaded, or we need a new setting (though I think it would be more confusing).
comment:6 Changed 9 years ago by
Could someone please update the ImageUpload doco here http://docs.ckeditor.com/#!/guide/dev_file_upload to mention the ability to set 'width' and 'height' from the backend.
comment:7 Changed 9 years ago by
| Cc: | porjo added |
|---|

Done, using
loader.responseDataproperty introduced by #13519. Pushed branch:t/13794.