Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

593
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda