high-resolution.ts 511 B

1234567891011121314151617181920
  1. import { Pipe, PipeTransform } from "@angular/core";
  2. /**
  3. * Generated class for the HighResolutionPipe pipe.
  4. *
  5. * See https://angular.io/api/core/Pipe for more info on Angular Pipes.
  6. */
  7. @Pipe({
  8. name: "highResolution"
  9. })
  10. export class HighResolutionPipe implements PipeTransform {
  11. /**
  12. * Takes a profile img URL string and removes "normal" from the URL to receive a high resolution image
  13. */
  14. transform(value: string, ...args) {
  15. if (value) {
  16. return value.replace("_normal", "");
  17. }
  18. }
  19. }