Diving down into the implementation of this mechanism, shows that the resolved width is calculated based on the width of the
<img> nearest ancestor that has a physical width property. Such DOM element must be a block-level one. More information on Block vs. Inline level elements is available here.
In some scenarios the layout of a web-page must be forced to support such mechanism by surrounding the
<img> tag with block-level element to allow Cloudinary JS plugin to provide a proper results.