From ed2dfdae5bea93746be883bc528c1fb6407af6eb Mon Sep 17 00:00:00 2001
From: Emmanuel Chucks <31349069+emmanuelchucks@users.noreply.github.com>
Date: Thu, 20 Oct 2022 19:42:36 +0000
Subject: [PATCH] fix: updates to pass HTML attributes down to the
element (#5038)
* fix: also pass attrs to underlying img
`class` for direct img styling, `width` & `height` to prevent layout shift, etc need to be passed to the underlying img tag to work.
* remove redundant attr from picture tag
* revert to previous commit
- seemed to break some tests
- can't deal with fixing that right now, maybe later
* only passing attributes to the img
* adding a note to the README
* chore: add changeset
Co-authored-by: Tony Sullivan
---
.changeset/wicked-laws-heal.md | 11 ++++++++
packages/integrations/image/README.md | 4 +++
.../image/components/Picture.astro | 4 +--
.../basic-picture/src/pages/index.astro | 2 +-
.../image/test/picture-ssg.test.js | 28 +++++++++++--------
.../image/test/picture-ssr-build.test.js | 12 ++++----
.../image/test/picture-ssr-dev.test.js | 12 ++++----
7 files changed, 46 insertions(+), 27 deletions(-)
create mode 100644 .changeset/wicked-laws-heal.md
diff --git a/.changeset/wicked-laws-heal.md b/.changeset/wicked-laws-heal.md
new file mode 100644
index 000000000..bcaac6132
--- /dev/null
+++ b/.changeset/wicked-laws-heal.md
@@ -0,0 +1,11 @@
+---
+'@astrojs/image': minor
+---
+
+HTML attributes included on the `` component are now passed down to the underlying `` element.
+
+**Why?**
+
+- when styling a `