-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clarifying comments + more srcset values
- Loading branch information
1 parent
63c8def
commit 395a2ea
Showing
2 changed files
with
30 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/optimizer/spec/transformers/valid/OptimizeImages/adds_srcset/expected_output.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<html ⚡> | ||
<body> | ||
<!-- Injects srcset for responsive layout --> | ||
<amp-img src="image1.png" width="400" height="800" layout="responsive" srcset="image1.500w.png 500w, image1.1000w.png 1000w, image1.1500w.png 1500w"></amp-img> | ||
<amp-img src="image1.png" width="400" height="800" layout="responsive" srcset="image1.470w.png 470w, image1.820w.png 820w, image1.1440w.png 1440w"></amp-img> | ||
<!-- Ignores existing srcset --> | ||
<amp-img layout="fill" srcset="image-1x.png 1x, | ||
image-2x.png 2x"></amp-img> | ||
<!-- Only adds srcset if # images >2 --> | ||
<amp-img layout="responsive" width="2400" height="600" src="https://unsplash.it/1600/1200"></amp-img> | ||
<!-- Injects srcset for intrinsic layout --> | ||
<amp-img layout="intrinsic" width="20" height="10" src="https://unsplash.it/1600/1200" srcset="https://unsplash.39w.it/1600/1200 39w, https://unsplash.56w.it/1600/1200 56w, https://unsplash.82w.it/1600/1200 82w"></amp-img> | ||
<amp-img layout="intrinsic" width="20" height="10" src="https://unsplash.it/1600/1200" srcset="https://unsplash.39w.it/1600/1200 39w, https://unsplash.47w.it/1600/1200 47w, https://unsplash.68w.it/1600/1200 68w"></amp-img> | ||
</body> | ||
</html> |