Lazy load is converting quotes from image attributes into HTML entities

[ad_1]

Hi, I’m having issues with lazy load, is converting quotes from additional image attributes to html entities, like this:

<img width="150" height="100" src="https://local.com/app/uploads/140520-150x150.jpg" class="w-full h-full object-cover" alt="Owen Pallett In Conflict" decoding="async" srcset="https://local.com/app/uploads/140520-150x100.jpg 150w,  300w,  620w,  218w,  640w,  320w,  298w,  313w,  191w,  158w,  414w,  940w" sizes="(max-width: 150px) 100vw, 150px" onerror="this.onerror=null; this.src='https://local.com/app/themes/a-theme/public/images/svg/logo.svg'; this.srcset='https://local.com/app/themes/a-theme/public/images/svg/logo.svg'; this.className='h-9 mx-auto top-[calc(50%-16px)] relative opacity-10';" />

I have been trying to figure out a way to prevent this, but the only way I figure it out that works is by adding html_entity_decode on the file

plugins/powered-cache/includes/classes/LazyLoad.php

At lines 335 and 336

array_push( $search, html_entity_decode( $img_html ) );
array_push( $replace, html_entity_decode( $replace_html ) )

Is there a better workaround for this issue?

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer