Page 1 of 1

Code For webp or jpg Images

Posted: Sun Jun 07, 2020 7:28 pm
by CathodeRay
The code I normally use on the web site for dishing out webp or jpg images (depending on the browser) does not work in the blog. I did some digging and found this does work in the blog.

<picture>
<source srcset="/blog/operating-curve.webp">
<source srcset="/blog/operating-curve.jpg">
<img style="width: 500px; max-width: 100%;" src="/blog/operating-curve.jpg" alt="vacuum tube operating curve"">
</picture>

I checked it in Internet Explorer and the jpg images show. In Chrome and Firefox the webp versions show.