IT Nota

  • Home
  • How To
  • .NET
  • WordPress
  • Contact
You are here: Home / How To / How to Serve WebP Image Format with Fallback for Other Browsers

How to Serve WebP Image Format with Fallback for Other Browsers

Considering the majority of web users are using Chrome, it’s probably wise to consider using WebP image format on your website. However, since WebP only supported by Chrome and Opera, we also want to utilize an easy fallback for other browsers.

Can I Use WebP Browser Support

The easiest method to do is by using element as follow:

<picture>
  <source srcset="images/logo.webp" type="image/webp">
  <img src="images/logo.png" id="logo" alt="IT Nota Logo example">
</picture>

That’s all there is to it. You can check which image is loaded using your browser developer tools.

If you use an IIS server, you need to add this new image type into the MIME Type before you can serve WebP format on your page.

Further Reading

How to Serve WebP Image on IIS
How to Serve AVIF Image on IIS
How to Serve AVIF Image Format with Fallback for Other Browsers

May 26, 2017 Filed Under: How To Tagged With: HTML5

Buy me a coffee?

Buy me a coffee If you find any of the articles or demos helpful, please consider supporting my work here, you'll have my big thanks!

Comments

  1. Iryna says

    June 18, 2019 at 1:16 pm

    Thank you!
    I have tried that…It seems WordPress sites need more efforts
    Do you know how to make it work in Worpdress without any plugins?
    Thanks!

    Reply
    • platt says

      June 28, 2019 at 4:44 pm

      Hi Iryna,

      Unfortunately, other than programming the function in PHP yourself, I don’t see any other way to do it without a plugin. But there are some good plugins that can perform this without much effort.

      Reply
  2. howard says

    March 7, 2018 at 2:24 pm

    This was very good advice, and I will come back to look at your site again. I have just done a responsive image / picture gallery and needed this type of advice. Please keep up the good work.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Buy me a coffee Support this site
Buy Me a Coffee?

Categories

  • .NET
  • Coding
  • Cybersecurity
  • Database
  • How To
  • Internet
  • Multimedia
  • Photography
  • Programming
  • Resources
  • Review
  • Tips and Tricks
  • Uncategorized
  • Use Case
  • WordPress
  • Writing

Recent Posts

  • How to View Stored Procedure Code in SQL Server
  • How to Find a String in SQL Server Stored Procedures
  • How to Remove Cached Credentials without Rebooting Windows
  • ESP Work Automation: Empowering Enterprises with Streamlined Workflows and Operational Efficiency
  • How to Search for a String in All Tables in a Database

Recent Posts

  • How to View Stored Procedure Code in SQL Server
  • How to Find a String in SQL Server Stored Procedures
  • How to Remove Cached Credentials without Rebooting Windows
  • ESP Work Automation: Empowering Enterprises with Streamlined Workflows and Operational Efficiency
  • How to Search for a String in All Tables in a Database

Tags

.NET .NET Core AdSense ASP.NET Cdonts Dll Classic ASP Code Editor ETL FSharp Genesis Framework Git Google HP Asset Manager HTML5 Hugo IIS Information Security Internet Internet Information Services iOS JAMStack Linux macOS Microsoft Microsoft SQL Server MVC PHP PowerShell Python Simple Mail Transfer Protocol Smtp Server SQL SQL Server SSIS SSMS SSRS Sublime Text Visual Studio Visual Studio Code VPN Windows Windows 8 Windows 10 Windows 2012 Windows Server

Copyright © 2011-2025 IT Nota. All rights reserved. Terms of Use | Privacy Policy | Disclosure