Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Critical: Missing Default width and height Attributes for Image Component in Breakdance 2.1+ (Causes Content Reflow on All Websites) #1170

Open
fatheaddrummer opened this issue Nov 15, 2024 · 0 comments

Comments

@fatheaddrummer
Copy link

Bug Description:

When using the new Image component in Breakdance 2.1 and later, the width and height attributes of the <img> tag are not set automatically. This results in content reflow issues because the browser cannot calculate the image dimensions without these attributes.

Steps to Reproduce:

  1. Create a new page.
  2. Add the Image component to the page.
  3. Select an image from the WordPress media library.
  4. Save the page without making any additional changes to the Image component.
  5. Preview the page in the browser and inspect the HTML of the <img> tag.

Expected Behavior:

The <img> tag should automatically include the width and height attributes based on the dimensions of the selected image.

Actual Behavior:

The <img> tag does not include width and height attributes, resulting in layout issues due to content reflow.

Additional Notes:

Before Breakdance 2.1, the width and height attributes were set automatically. This issue likely occurred due to the introduction of manual settings for these attributes in version 2.1. However, a fallback to the default dimensions of the image source is missing.

This is a critical issue as it affects the performance and layout stability of all websites built with Breakdance 2.1 and above.

Thank you for reviewing this report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant