diff --git a/.changeset/healthy-glasses-smash.md b/.changeset/healthy-glasses-smash.md
new file mode 100644
index 000000000000..7bd01c93a63c
--- /dev/null
+++ b/.changeset/healthy-glasses-smash.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Upgrade compiler to bring in Image view transition support
diff --git a/packages/astro/e2e/fixtures/view-transitions/astro.config.mjs b/packages/astro/e2e/fixtures/view-transitions/astro.config.mjs
index 50ba5b32c61d..9e89fa72e62a 100644
--- a/packages/astro/e2e/fixtures/view-transitions/astro.config.mjs
+++ b/packages/astro/e2e/fixtures/view-transitions/astro.config.mjs
@@ -4,5 +4,6 @@ import { defineConfig } from 'astro/config';
export default defineConfig({
experimental: {
viewTransitions: true,
+ assets: true,
},
});
diff --git a/packages/astro/e2e/fixtures/view-transitions/src/assets/penguin.jpg b/packages/astro/e2e/fixtures/view-transitions/src/assets/penguin.jpg
new file mode 100644
index 000000000000..9e859269cb17
Binary files /dev/null and b/packages/astro/e2e/fixtures/view-transitions/src/assets/penguin.jpg differ
diff --git a/packages/astro/e2e/fixtures/view-transitions/src/components/Penguin.astro b/packages/astro/e2e/fixtures/view-transitions/src/components/Penguin.astro
new file mode 100644
index 000000000000..51664f19196c
--- /dev/null
+++ b/packages/astro/e2e/fixtures/view-transitions/src/components/Penguin.astro
@@ -0,0 +1,5 @@
+---
+import { Image } from 'astro:assets';
+import penguinSrc from '../assets/penguin.jpg';
+---
+
diff --git a/packages/astro/e2e/fixtures/view-transitions/src/pages/image-one.astro b/packages/astro/e2e/fixtures/view-transitions/src/pages/image-one.astro
new file mode 100644
index 000000000000..8932695e4959
--- /dev/null
+++ b/packages/astro/e2e/fixtures/view-transitions/src/pages/image-one.astro
@@ -0,0 +1,9 @@
+---
+import Layout from '../components/Layout.astro';
+import Penguin from '../components/Penguin.astro';
+---
+
+
+ Page 1
+ go to 2
+
diff --git a/packages/astro/e2e/fixtures/view-transitions/src/pages/image-two.astro b/packages/astro/e2e/fixtures/view-transitions/src/pages/image-two.astro
new file mode 100644
index 000000000000..aa53f256a752
--- /dev/null
+++ b/packages/astro/e2e/fixtures/view-transitions/src/pages/image-two.astro
@@ -0,0 +1,8 @@
+---
+import Layout from '../components/Layout.astro';
+import Penguin from '../components/Penguin.astro';
+---
+
+ Page 2
+
+
diff --git a/packages/astro/e2e/view-transitions.test.js b/packages/astro/e2e/view-transitions.test.js
index 12ccd2b891a8..82007122a8fb 100644
--- a/packages/astro/e2e/view-transitions.test.js
+++ b/packages/astro/e2e/view-transitions.test.js
@@ -182,4 +182,11 @@ test.describe('View Transitions', () => {
await page.click('#click-one');
await expect(p, 'should have content').toHaveText('Page 1');
});
+
+ test(' component forwards transitions to the ', async ({ page, astro }) => {
+ // Go to page 1
+ await page.goto(astro.resolveUrl('/image-one'));
+ const img = page.locator('img[data-astro-transition-scope]');
+ await expect(img).toBeVisible('The image tag should have the transition scope attribute.');
+ });
});
diff --git a/packages/astro/package.json b/packages/astro/package.json
index b8869e3f9245..ed0a9a215de2 100644
--- a/packages/astro/package.json
+++ b/packages/astro/package.json
@@ -115,7 +115,7 @@
"test:e2e:match": "playwright test -g"
},
"dependencies": {
- "@astrojs/compiler": "^1.6.0",
+ "@astrojs/compiler": "^1.6.3",
"@astrojs/internal-helpers": "^0.1.1",
"@astrojs/language-server": "^1.0.0",
"@astrojs/markdown-remark": "^2.2.1",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 85e7f3c03854..a114d0f1a1fe 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -486,8 +486,8 @@ importers:
packages/astro:
dependencies:
'@astrojs/compiler':
- specifier: ^1.6.0
- version: 1.6.0
+ specifier: ^1.6.3
+ version: 1.6.3
'@astrojs/internal-helpers':
specifier: ^0.1.1
version: link:../internal-helpers
@@ -5584,8 +5584,8 @@ packages:
sisteransi: 1.0.5
dev: false
- /@astrojs/compiler@1.6.0:
- resolution: {integrity: sha512-vxuzp09jAW/ZQ8C4Itf6/OsF76TNjBQC06FNpcayKOzxYkCGHTLh7+0lF4ywmG/fDgSc+f1x7kKxxEKl4nqXvQ==}
+ /@astrojs/compiler@1.6.3:
+ resolution: {integrity: sha512-n0xTuBznKspc0plk6RHBOlSv/EwQGyMNSxEOPj7HMeiRNnXX4woeSopN9hQsLkqraDds1eRvB4u99buWgVNJig==}
/@astrojs/internal-helpers@0.1.1:
resolution: {integrity: sha512-+LySbvFbjv2nO2m/e78suleQOGEru4Cnx73VsZbrQgB2u7A4ddsQg3P2T0zC0e10jgcT+c6nNlKeLpa6nRhQIg==}
@@ -5595,7 +5595,7 @@ packages:
resolution: {integrity: sha512-oEw7AwJmzjgy6HC9f5IdrphZ1GVgfV/+7xQuyf52cpTiRWd/tJISK3MsKP0cDkVlfodmNABNFnAaAWuLZEiiiA==}
hasBin: true
dependencies:
- '@astrojs/compiler': 1.6.0
+ '@astrojs/compiler': 1.6.3
'@jridgewell/trace-mapping': 0.3.18
'@vscode/emmet-helper': 2.8.8
events: 3.3.0
@@ -15666,7 +15666,7 @@ packages:
resolution: {integrity: sha512-dPzop0gKZyVGpTDQmfy+e7FKXC9JT3mlpfYA2diOVz+Ui+QR1U4G/s+OesKl2Hib2JJOtAYJs/l+ovgT0ljlFA==}
engines: {node: ^14.15.0 || >=16.0.0, pnpm: '>=7.14.0'}
dependencies:
- '@astrojs/compiler': 1.6.0
+ '@astrojs/compiler': 1.6.3
prettier: 2.8.8
sass-formatter: 0.7.6
dev: true
@@ -15675,7 +15675,7 @@ packages:
resolution: {integrity: sha512-lJ/mG/Lz/ccSwNtwqpFS126mtMVzFVyYv0ddTF9wqwrEG4seECjKDAyw/oGv915rAcJi8jr89990nqfpmG+qdg==}
engines: {node: ^14.15.0 || >=16.0.0, pnpm: '>=7.14.0'}
dependencies:
- '@astrojs/compiler': 1.6.0
+ '@astrojs/compiler': 1.6.3
prettier: 2.8.8
sass-formatter: 0.7.6
synckit: 0.8.5
@@ -18684,7 +18684,7 @@ packages:
sharp:
optional: true
dependencies:
- '@astrojs/compiler': 1.6.0
+ '@astrojs/compiler': 1.6.3
'@astrojs/internal-helpers': 0.1.1
'@astrojs/language-server': 1.0.0
'@astrojs/markdown-remark': 2.2.1(astro@2.9.3)