Skip to content

Commit 4b961bf

Browse files
committed
Do not add sizes attr to img when responsive is false
1 parent 0deefec commit 4b961bf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

projects/imagekit-angular/src/lib/directives/ik-image.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ export class IKImageDirective implements OnChanges {
208208
}
209209

210210
// Apply sizes attribute if provided
211-
if (this.sizes) {
211+
if (this.sizes && this.responsive) {
212212
this.renderer.setAttribute(this.el.nativeElement, 'sizes', this.sizes);
213213
}
214214

0 commit comments

Comments
 (0)