Set image width and height

This example shows how to enable width and height fields in the image properties form.

Code

<div id="entry-image-dimensions"></div>
const app = Redactor('#entry-image-dimensions', {
    image: {
        upload: '/api/endpoint/upload-image/',
        width: true,
        height: true
    },
    content: '<figure><img src="/assets/img/photo.jpg" alt="Sample" width="400" height="250"></figure>'
});