Skip to content

Fix sizes property for image tag in all the blocks. #6687

@iRohitSingh

Description

@iRohitSingh

Describe the bug
We have images with scales but we are not providing the proper sizes property. Browser choose appropriate image based on sizes provided and mentioined in srcset. We have srcset but we are not using the full potential here. I can say it is broken in some sense.

To Reproduce

Steps to reproduce the behavior:

  1. Create a image block
  2. Open developer tools and inspect image.
  3. Inspect image.
  4. You will the sizes propety is 100vw which means that give me image of viewport width since our viewport is bigger we always loads the biggest image.

Expected behavior

We should have correct sizes propety belongs to that blocks. Which will use the srcset propety properly.

Screenshots

For teaser block we are not even providing the sizes property.

Image

For image block sizes is set to 100vw

Image

@pnicolli can you please give your feedback regarding this issue?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions