Skip to content

Commit 0deefec

Browse files
committed
Remove height input from image directive
1 parent ffb543f commit 0deefec

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

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

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,7 @@ export class IKImageDirective implements OnChanges {
100100
* If non-numeric values like "100px" or "100%" are provided, they are ignored for srcset generation.
101101
*/
102102
@Input() width?: IKImageProps['width'];
103-
104-
/**
105-
* The intended display height of the image.
106-
* Applied to the height attribute of the img element.
107-
*/
108-
@Input() height?: IKImageProps['height'];
109-
103+
110104
/**
111105
* The sizes attribute for responsive images.
112106
* Defines the intended display size of the image for different viewport conditions.
@@ -223,11 +217,6 @@ export class IKImageDirective implements OnChanges {
223217
this.renderer.setAttribute(this.el.nativeElement, 'width', this.width.toString());
224218
}
225219

226-
// Apply height attribute if provided
227-
if (this.height) {
228-
this.renderer.setAttribute(this.el.nativeElement, 'height', this.height.toString());
229-
}
230-
231220
if (this.loading) {
232221
this.renderer.setAttribute(this.el.nativeElement, 'loading', this.loading);
233222
}

0 commit comments

Comments
 (0)