Skip to content

Commit

Permalink
Merge pull request #701 from angular/main
Browse files Browse the repository at this point in the history
Create a new pull request by comparing changes across two branches
  • Loading branch information
GulajavaMinistudio committed Oct 21, 2022
2 parents 1fa930d + 6b9b472 commit 1898719
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,11 @@ export class NgOptimizedImage implements OnInit, OnChanges, OnDestroy {
assertEmptyWidthAndHeight(this);
} else {
assertNonEmptyWidthAndHeight(this);
// Only check for distorted images when not in fill mode, where
// images may be intentionally stretched, cropped or letterboxed.
assertNoImageDistortion(this, this.imgElement, this.renderer);
}
assertValidLoadingInput(this);
assertNoImageDistortion(this, this.imgElement, this.renderer);
if (!this.ngSrcset) {
assertNoComplexSizes(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ import {Component} from '@angular/core';
<!-- Aspect-ratio: 1.0652173913 -->
<img ngSrc="/e2e/b.png" width="245" height="230">
<br>
<!-- Fill mode disables aspect ratio warning -->
<!-- Aspect-ratio: 0.1 -->
<img ngSrc="/e2e/b.png" width="24" height="240" disableOptimizedSrcset fill>
<br>
<!-- Supplied aspect ratio is correct & image has 0x0 rendered size -->
<img ngSrc="/e2e/a.png" width="25" height="25" style="display: none">
<br>
Expand Down

0 comments on commit 1898719

Please sign in to comment.