Best way to display fallback images?

I’m optimizing our website for webp images but want to make sure jpeg is a fallback. What is the best way to accomplish this? Can it be done under the display options and the conditional logic with a browser variable or is there an easier way? I want to do this without plugins.