Code For webp or jpg Images

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
CathodeRay
Posts: 1
Joined: Sun Jun 07, 2020 7:00 pm

Code For webp or jpg Images

Post by CathodeRay » Sun Jun 07, 2020 7:28 pm

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.

Post Reply