summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Matt Kane <m@mk.gg> 2025-04-29 11:15:14 +0100
committerGravatar GitHub <noreply@github.com> 2025-04-29 11:15:14 +0100
commit210399155a6004e8e975f9024ae6d7e9945ae9a9 (patch)
treee9c936083554d7cadbd2f567e42ecc71148ad7f2
parent3bdc7af2247d67993a9ad0642a07e4edded780fd (diff)
downloadastro-210399155a6004e8e975f9024ae6d7e9945ae9a9.tar.gz
astro-210399155a6004e8e975f9024ae6d7e9945ae9a9.tar.zst
astro-210399155a6004e8e975f9024ae6d7e9945ae9a9.zip
fix: set height: auto for responsive images (#13711)
-rw-r--r--.changeset/fuzzy-laws-kick.md5
-rw-r--r--packages/astro/components/image.css1
2 files changed, 6 insertions, 0 deletions
diff --git a/.changeset/fuzzy-laws-kick.md b/.changeset/fuzzy-laws-kick.md
new file mode 100644
index 000000000..ad3e33c34
--- /dev/null
+++ b/.changeset/fuzzy-laws-kick.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Fixes height for responsive images
diff --git a/packages/astro/components/image.css b/packages/astro/components/image.css
index 87b22128c..6815ec126 100644
--- a/packages/astro/components/image.css
+++ b/packages/astro/components/image.css
@@ -1,6 +1,7 @@
:where([data-astro-image]) {
object-fit: var(--fit);
object-position: var(--pos);
+ height: auto;
}
:where([data-astro-image='full-width']) {
width: 100%;