Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

584
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!