Code Monkey home page Code Monkey logo

Comments (6)

futtta avatar futtta commented on September 22, 2024

"new AO broke it completely" implied this problem did not exist when still on 3.1.2 @grzegorz-janoszka ?

from autoptimize.

grzegorz-janoszka avatar grzegorz-janoszka commented on September 22, 2024

The problem began precisely in the beginning of the week 41. Not sure which version was then.

from autoptimize.

futtta avatar futtta commented on September 22, 2024

week 41, that's approximately when you activated the AOPro Beta, which enabled lazyload and Image Optimization (which also does webp/ avif ) through Shortpixel, in which case indeed the srcset is changed to data-srcset.

what you can do;

  • disable AO lazyload
  • add avif or source to the lazyload exclusions
  • disable lazyload (and img opt) acting on picture/source elements with this filter; add_filter( 'autoptimize_filter_imgopt_dopicture', '__return_false' );

from autoptimize.

grzegorz-janoszka avatar grzegorz-janoszka commented on September 22, 2024

It wasn't about serving images from the CDN, it was about the content of the data-srcset:

<source data-srcset="https://sp-ao.shortpixel.ai/client/to_webp,q_glossy,ret_img/https://mysite.tld/uploads/2015/08/image-500x332.avif" type="image/avif" />

Is that a right syntax?

from autoptimize.

futtta avatar futtta commented on September 22, 2024

AO's lazyload changes <source srcset into <source data-srcset indeed

AO's image opt. changes https://mysite.tld/uploads/2015/08/image-500x332.avif into https://sp-ao.shortpixel.ai/client/to_webp,q_glossy,ret_img/https://mysite.tld/uploads/2015/08/image-500x332.avif

from autoptimize.

grzegorz-janoszka avatar grzegorz-janoszka commented on September 22, 2024

Ah, I know what the problem was. Some images are served as webp, some are avif, no idea why. When I was diagnosing it I saw the image served as webp, and then by mistake I checked the html code for another image (which was served as avif) and I assumed the avif link was broken. Sorry for false alarm.

from autoptimize.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.