Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

587
Vistas
How to view any image format to avif format in angular?

I'm using angular 10. and I want to view / show Image in AVIF format.

With compress version.

EXAMPLE: Already these kind of images in my database

(suppose these all image file size is more than 5 mb)

demoImage.jpeg or demoImage.png or demoImage.webp

But when I'm showing in frontend using angular I need to show in AVIF format only

(and this image must be in compressed)

Like this demoImage.avif

So how can I archive this?

about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

You can use the package Sharp, to compress the images to AVIF format. It's also possible to convert it to other formats than that if needed. In it you can also find the most necessary instructions to get it up and running.

Then you can show the image using the attribute which I guess most browsers support.

<picture>
 <source srcSet="image.avif" type="image/avif" />
</picture>
about 4 years ago · Santiago Gelvez Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda