Why website testimonials (owl carousel) not showing with WP Rocket enabled + images served as webp?

I am trying to optimize a website for faster page load speed. I did 2 things: (1) converted all images to WebP format and (2) purchased WP Rocket and enabled it on the site. Performance improved slightly but the testimonial sliders (which operate on JQuery’s owl carousel) are not showing on the 2 pages where I have them displayed.

When I troubleshoot the problem on Chrome Inspect tool, I get this error: “Uncaught SyntaxError: unexpected string” and this is the line where the error happens:

                navText: [
                "<img src="/wp-content/uploads/2020/01/arrow_left.png.webp" /> Prev Video",
                "Next Video <img src="/wp-content/uploads/2020/01/arrow_right.png.webp" />"],

Here is the full code snippet:

        jQuery(document).ready(function($) {
            var owl = $('.full-video-slider');
                owl.owlCarousel({
                items:1,
                margin: 0,
                nav: true,
                navText: [
                "<img src="/wp-content/uploads/2020/01/arrow_left.png.webp" /> Prev Video",
                "Next Video <img src="/wp-content/uploads/2020/01/arrow_right.png.webp" />"],
                autoplay:false,
                loop: true,
                video:true,
                videoWidth: false,
                videoHeight: false,
            });
        });

I tried to override this in Chrome by replacing the erroneous line with the following line and the error goes away:

        navText : ["<i class='fa fa-angle-left'></i>","<i class='fa fa-angle-right'></i>"],

Here is the problem: I am using the Avada Child Theme and cannot find the index.html file where this code snippet is located! I tried everything to fix this problem and I am totally stumped!

I already tried to excluded the Owl Carousel CSS/JS files from optimization (in WP Rocket), to disable and re-enabled various WP Rocket settings, and I even reached out to WP Rocket support team which was no help at all!

Any help, advise, or tip on how I could go about fixing this problem would be very greatly appreciated!

P.s. when I exclude the 2 pages with the testimonial sliders from WP Rocket’s Caching, then I see the testimonial sliders as before, but my website performance goes back down, which defeats the whole purpose!

Please help!!!