Image width and height are undefined
Closed this issue · 1 comments
Describe the bug
The width
and height
attribute of images is undefined
:
<img src=\"<src-path>\" alt=\"<alt-text>\" srcset=\"<src-set>\" sizes=\"100vw\" width=\"undefined\" height=\"undefined\">
To Reproduce
Steps to reproduce the behavior:
- Add an image from the media library into the CKEditor
- Save the entity
- Look at the API response
Expected behavior
Receive the width
and height
of the image in the API response
I've also tried using the other CKEditor plugin: https://github.com/ckeditor/strapi-plugin-ckeditor/, however I prefer this one as it allows a lot more customisation.
The other plugin sends undefined
as well if you just add the image, however once you change alignment of the image it start reporting the width
and height
properties. This plugin still reports undefined
if you change alignment or resize the image however (it does report a resize %). Perhaps this helps to find the issue (or if this plugin relies on some of their code you could pass on an issue report to them).
Having the width
and height
attributes available would be useful to be able to optimise the images when using them in a NextJS setup (parsing the html and loading the images into a <Image>
component).