Skip to content

1.6.0 null width in rendered <img /> tag #175

@matfisch

Description

@matfisch

I noticed after bumping to version 1.6 that if the <Image /> component is passed both width and the responsive prop that the returned <img /> tag width property is null. The outcome was all of our images grew significantly in size.

.cld-responsive{
    max-width:100%;
    max-height: 100%;
}

Given the rules for cld-responsive I wouldn't be surprised if we are misusing the responsive prop (it is defaulted to true in our of our components that wraps <Image />) but this hasn't been an issue until version 1.6.0.

I could use some more clarity on the intent of the changes if this is expected behavior.

Steps to reproduce

<Image
   responsive
   publicId={publicId}
   width={width}
   height={height}
/>

1.6.0
<img width="null" height="68" data-src="..." src="..." class="cld-responsive">

1.5.1
<img width="68" height="68" src="...">

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions