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

93
Visualizações
Safari won't fallback an AVIF picture

I'm trying to render an image with the below code:

<picture>
  <source srcset="https://75tm.gr/GFXS1205/2048/GFXS1205.avif">
  <source srcset="https://75tm.gr/GFXS1205/2048/GFXS1205.webp">
  <img src="https://75tm.gr/GFXS1205/2048/GFXS1205.jpg">
</picture>

On Safari browsers, the image is not getting rendered at all. If I delete the first source though that has the .avif format, then Safari displays correctly the fallback .jpg image.

View on JsFiddle

Is this a Safari bug? If so, this really prevents the usage of the .avif format. Does anyone know of a workaround?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Safari can't fallback if you don't provide type attribute. So you need something like this (tested on Safari, works fine for me):

<picture>
  <source srcset="https://75tm.gr/GFXS1205/2048/GFXS1205.avif" type="image/avif">
  <source srcset="https://75tm.gr/GFXS1205/2048/GFXS1205.webp" type="image/webp">
  <img src="https://75tm.gr/GFXS1205/2048/GFXS1205.jpg">
</picture>

about 4 years ago · Juan Pablo Isaza 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