• Resolved kozak85

    (@kozak85)


    Could you explain why the plugin does not convert background images into webP or AVIF, and also why in sliders it does not optimize for WebP or AVIF image formats, for example, in slick slider? And is it possible with a plugin to do this?

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    problem is that AO relies on JavaScript to differentiate between browsers that support AVIF or WebP and that that JavaScript hooks into AO’s lazyload to do so and that lazyload does not work on background images unless they are set in inline styles (i.e. as part of the node where the background image is to be shown in).

    sliders are another issue, likely due to the slider using JS to load images instead of <img or <picture tags.

    hope this clarifies,
    frnak

    Thread Starter kozak85

    (@kozak85)

    I partially understand! But not all! see my background image gets into the shortpixel and is optimized, but without the AVIF and WebP format, what can this be connected with? How to solve?

    Thread Starter kozak85

    (@kozak85)

    background picture is embedded in HTML!

    Thread Starter kozak85

    (@kozak85)

    And sorry, I’m a beginner, I’m learning and still don’t understand a lot! It turns out that I can not use your plugin to make photos in the slider in AVIF and WebP format and load them from the shortpixel? did I understand correctly? or is it possible?

    Thread Starter kozak85

    (@kozak85)

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Ah, the reason is the fact the <img tags in the sliders don’t have a src, but a lazy-src instead, which AO does not act upon.

    Thread Starter kozak85

    (@kozak85)

    Thank you! slightly altered the slider and it worked!

    Thread Starter kozak85

    (@kozak85)

    And tell me how to remove unused CSS code in your plugin in the mobile version? This is written in pagespeed google! It is possible somehow easy to do or write something without knowledge of php, can you have a code ?!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    AO cannot remove unused CSS I’m afraid, but maybe take a look at https://www.ads-software.com/plugins/unusedcss/ (free plugin which uses a premium service) which does just that?

    Thread Starter kozak85

    (@kozak85)

    Thank you!))

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Optimize background images or sliders’ is closed to new replies.