Title: HTML Widget Using JS
Last modified: December 1, 2020

---

# HTML Widget Using JS

 *  Resolved [floodrod](https://wordpress.org/support/users/floodrod/)
 * (@floodrod)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/html-widget-using-js/)
 * Hello!
 * I am using a CDN and have JS WebP Rewriting enabled. Site images seem to work
   fine. But I have several html widgets that have images in them. I do not know
   the html to put in the widget to show WebP images.
 * Would you be so kind to post example html code which would show WebP image / 
   Jpeg depending on browser with JS rewriting method?
 *     ```
       <p><a href="https://yahoo.com">
       <img border="0" src="https://yahoo.com/image1.jpg" width="501" height="281"></a></p>
       ```
   
 * Thank You

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/html-widget-using-js/#post-13731038)
 * Could you please clarify what these HTML widgets are? Normally, anything within
   your page is covered by JS WebP, especially since the example you gave is a standard
   img element.
    Or is it that these widgets have third-party images in them?
 *  Thread Starter [floodrod](https://wordpress.org/support/users/floodrod/)
 * (@floodrod)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/html-widget-using-js/#post-13731126)
 * Thank You..
 * I uploaded with Wordprress Media uploader, and changed image addresses. now all
   are in WebP..
 * good to go!
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/html-widget-using-js/#post-13731150)
 * Unless you don’t care about supporting all the non-WebP browsers, that’s not 
   exactly what I meant…
 * Perhaps you could provide an actual link to the page you’re having trouble with,
   along with which images are giving you a hard time?
    -  This reply was modified 5 years, 6 months ago by [Shane Bishop](https://wordpress.org/support/users/nosilver4u/).

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘HTML Widget Using JS’ is closed to new replies.

 * ![](https://ps.w.org/ewww-image-optimizer/assets/icon-256x256.png?rev=1582276)
 * [EWWW Image Optimizer](https://wordpress.org/plugins/ewww-image-optimizer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ewww-image-optimizer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ewww-image-optimizer/)
 * [Active Topics](https://wordpress.org/support/plugin/ewww-image-optimizer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ewww-image-optimizer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ewww-image-optimizer/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/html-widget-using-js/#post-13731150)
 * Status: resolved