wordpresslazy-loading

How can I make my Portofolio Carousel plugin thumbnail not blurry?


Some images displayed by the Portofolio Carousel plugin look blurry. How can I make this blurred thumbnail High-Definition? I turned off lazy loading with this code but it's still loading lazy:

add_filter('wp_lazy_loading_enabled', '__return_false');

My website using WordPress.


Solution

  • Portofolio Carousel plugin is adding 350x181 at the end of the link, which makes it use a lower quality image (original file is mmd.png, in that plugin it's mmd-350x181.png).

    From the src attribute value I changed 350x181.png to .png using JavaScript:

    $ = jQuery;
    $(document).ready(function() {
        const imgs=document.querySelectorAll('#portofolio img');
        imgs.forEach(img => console.log(img.removeAttribute('srcset'), img.removeAttribute('loading'),img.src=img.src.replace("-350x181","")));
    });