1
resposta

img-thumbnail não redimensiona a figura ao diminuir o tamanho da tela no browser


app
   photo
     photo.component.ts
        import { Component } from "@angular/core";

        @Component({
            selector:'ap-photo',
            templateUrl:'photo.component.html'
        })
                export class PhotoComponent {
                    description = 'Leão';

                    url = 'https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/Sultan_the_Barbary_Lion.jpg/440px-Sultan_the_Barbary_Lion.jpg';
                }

     photo.component.html
                <img class="img-thumbnail" [src]="url" [alt]="description">

   app.component.html
        <ap-photo></ap-photo>

   app.component.ts
    import { Component } from '@angular/core';

    @Component({
      selector: 'app-root',
      templateUrl: './app.component.html',
      styleUrls: ['./app.component.css']
    })
    export class AppComponent {
    }


   app.module.ts
    import { BrowserModule } from '@angular/platform-browser';
    import { NgModule } from '@angular/core';

    import { AppComponent } from './app.component';
    import { PhotoComponent } from './photo/photo.component';

    @NgModule({
      declarations: [
        AppComponent,
        PhotoComponent
      ],
      imports: [
        BrowserModule
      ],
      providers: [],
      bootstrap: [AppComponent]
    })
    export class AppModule { }
1 resposta

Fala ai Jorge, tudo bem? Como está o CSS desse componente? Você definiu o tamanho da imagem utilizando medias fixas?

Espero ter ajudado.